Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SPMAP with Stata 15? Polygon-outlines disappear...

    Anyone else using SPMAP with Stata 15 (latest versions)? I noticed a problem with the outlines of polygons. They just disappear using Stata 15, no matter what size I choose in osize().

    Can someone reproduce this?
    Thanks!

  • #2
    Can you post a reproducible example?
    __________________________________________________ __
    Assistant Professor, Department of Biostatistics and Epidemiology
    School of Public Health and Health Sciences
    University of Massachusetts- Amherst

    Comment


    • #3
      Looks like I have two problems:

      1. I changed line-date (small rivers) to polygons with QGIS and merged this with lakes+big rivers (polygons) into one dataset. Worked fine with Stata 14 (stata14.pdf). Now with Stata 15 the small rivers converted from lines to polygons disappear (stata15.pdf). Both graphs created by the exact same code:
      spmap turnout using "data/shp/utm32_de_coor", id(id) ///
      clnumber(16) fcolor(Heat) clmethod(eqint) eirange(13 78) ocolor(Heat) osize(vvthin) ///
      legend(off) name(turnout, replace) ///
      polygon(data("data/shp/dlm250_coor2") by(linetype) ///
      fcolor(blue*.5 blue*.7) ocolor(blue*.7 blue*.7) osize(thick thick))

      2.The other problem is Stata 15 ignoring the osize-option inside of polygon(). If you run the spmap-example code below in 14 and 15 you can see the difference:
      use "Italy-OutlineData.dta", clear
      spmap using "Italy-OutlineCoordinates.dta", id(id) fc(sand) ///
      polygon(data("Italy-Lakes.dta") fcolor(blue) ocolor(red) osize(vvthick))
      data is attached.

      I'm really confused on how those problems are connected...if needed, I can upload the data for problem 1.

      Any idea?
      Attached Files

      Comment


      • #4
        Please upload data for problem 1 too.
        -Chinh Nguyen

        Comment


        • #5
          ok, use this code:
          Code:
          use "s21", clear
          
          spmap turnout using "utm32_de_coor", id(id) ///
            clnumber(16) clmethod(eqint) fcolor(Heat) ocolor(Heat) eirange(13 78) ///
            osize(vvthin) legend(off) ///
            polygon(data("dlm250_coor2") by(linetype) ///
            fcolor(blue*.5 blue*.7) ocolor(blue*.7 blue*.7) osize(thick thick))
          with -this- data
          (normal upload failed: "This is not a valid image file". ???)

          Comment


          • #6
            Both problems are due to a change in Stata 15 in how it strokes outlines. As a result of transparency color support in Stata 15, Stata by default strokes outlines of objects using what's know as an inside stroke rather than a center stroke. This has caused objects, such as polygons, to appear smaller which is what you're seeing. I believe this can be fixed by simply changing the default stroke for polygons in the scheme files which we'll release in an update.
            -Chinh Nguyen

            Comment


            • #7
              ok, that makes sense! Will use Stata 14 for now (and will not ask for ETA)...

              Thanks!

              Comment


              • #8
                With Maurizio Pisati's permission, and thanks to Kit Baum for maintaining the SSC, we updated spmap to use center stroked outlines in Stata 15. This change was made using version control so that spmap continues to work in older versions of Stata.

                To update spmap in Stata, type
                Code:
                adoupdate spmap
                then follow the instructions.

                Comment

                Working...
                X