I'm using grmap to create a quite complicated map. I'm drawing a map with points and polygons superimposed on top of the base map. The code is the following:
use MANH_border_county2, replace
xtset, clear
spset, modify shpfile(usacounties_shp)
grmap, activate
#delimit ;
grmap,
plotregion(icolor(white)) graphregion(icolor(white))
ocolor(black ..) osize(medthick ..)
legstyle(2) legend(off) xsize(6.5)
polygon(
data(grids) by(border) ocolor(gray%20 magenta) osize(thin medthick)
)
point(
data(points)
xcoord(longitude) ycoord(latitude) by(fip) fcolor("0 39 76" "187 0 0") size(*0.00001 *0.00001))
label(
data(MANH_border_county2) xcoord(_CX) ycoord(_CY) label(NAME) color(black) size(*1.2))
;
#delimit cr
gr_edit SetAspectRatio 0.7
The usacounties_shp file is the generic US county shapefile and the MANH_border_county2 file is the characteristics file (that only contains the counties I want), both of which are generated by spshape2dta. The points file in the point() option and the grids file in the polygon() option are, well, describing the grids and points information. All the suboptions within polygon(), point(), and label() don't really matter for my question. And this is the map I have:

Now my problem is - how do I specify that the grid drawn by the polygon() option be superimposed on the very top such that it's not covered by those dots? Right now I can see that the dots drawn by the point() option are superimposed on the very top. This is important to me because I have other cases where there are way too many dots that are so dense as if the area has solid fill, in which case the magenta grids are not visible at all.
I understand this is probably a super edge case and won't be surprised if there is no way to achieve it. My last-resort solution is to randomly drop observations in the points file (only for problematic areas) such that I thin out the dots in dense areas. But I want to have a sanity check here before I do that, in case there is some command that easily changes superimpose order that I just didn't know.
Thank you so much!!
use MANH_border_county2, replace
xtset, clear
spset, modify shpfile(usacounties_shp)
grmap, activate
#delimit ;
grmap,
plotregion(icolor(white)) graphregion(icolor(white))
ocolor(black ..) osize(medthick ..)
legstyle(2) legend(off) xsize(6.5)
polygon(
data(grids) by(border) ocolor(gray%20 magenta) osize(thin medthick)
)
point(
data(points)
xcoord(longitude) ycoord(latitude) by(fip) fcolor("0 39 76" "187 0 0") size(*0.00001 *0.00001))
label(
data(MANH_border_county2) xcoord(_CX) ycoord(_CY) label(NAME) color(black) size(*1.2))
;
#delimit cr
gr_edit SetAspectRatio 0.7
The usacounties_shp file is the generic US county shapefile and the MANH_border_county2 file is the characteristics file (that only contains the counties I want), both of which are generated by spshape2dta. The points file in the point() option and the grids file in the polygon() option are, well, describing the grids and points information. All the suboptions within polygon(), point(), and label() don't really matter for my question. And this is the map I have:
Now my problem is - how do I specify that the grid drawn by the polygon() option be superimposed on the very top such that it's not covered by those dots? Right now I can see that the dots drawn by the point() option are superimposed on the very top. This is important to me because I have other cases where there are way too many dots that are so dense as if the area has solid fill, in which case the magenta grids are not visible at all.
I understand this is probably a super edge case and won't be surprised if there is no way to achieve it. My last-resort solution is to randomly drop observations in the points file (only for problematic areas) such that I thin out the dots in dense areas. But I want to have a sanity check here before I do that, in case there is some command that easily changes superimpose order that I just didn't know.
Thank you so much!!