Announcement

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

  • Graphing multiple spmap point plots with the same color scale

    I'm using spmap to plot temperatures taken at different coordinates as points on a map of New York. The temperature is indicated by color. The following command accomplishes this.

    spmap using "nycoord", id(id) point(data(temp_data) by(temp) xcoord(longitude) ycoord(latitude) fcolor(Rainbow) legenda(on))


    My issue is that I'd like to make four graphs, one for each season, and have a consistent color scale for the points among the four graphs. I've split my data so that there is a variable for each season (spring_temp, summer_temp, etc). When I plot for summer:

    spmap using "nycoord", id(id) point(data(temp_data) by(summer_temp) xcoord(longitude) ycoord(latitude) fcolor(Rainbow) legenda(on))

    the color scales to the max and min summer temperature, and when I plot for winter it scales to the max and min winter temperature. Is there any way to set a max and min for all 4 graphs so that the color scale is consistent?

  • #2
    Hi Brian - this problem is similar to one discussed in a previous link. Follow the link for ideas on how to proceed.

    http://www.statalist.org/forums/foru...-of-variations

    If you are unable to obtain a solution, provide a small dataset illustrating your problem.

    Comment


    • #3
      I was following this, though had no solution for him. Tried the ideas suggested in the link, and no luck -- cannot delete points in the plot editor or change the color of individual points. However, to take it a step farther, you might place your imaginary points outside the plot area (e.g. out in the ocean), export as .png or some other graphics format then erase them using an image editor such as Paint, Photoshop, or whatever you have available. Really kludgy, but should work. If you gave your imaginary points the same coordinates, not difficult to implement, either.

      Comment


      • #4
        I worked on a solution and it can be found in this link, answering a similar question
        I am using Stata14 and I have lights data. I am using the package spmap to create maps. I want to create two maps, one for 1992 and another for 2013

        Comment

        Working...
        X