Dear Statalist,
I am using the excellent tools provided in Ben Jann's geoplot and related commands. I have used the geoframe rclip tool to focus on my geographic area of interest. Everything works beautifully except that the graph plots the boundaries of the rectangle selected and clipped by geoframe clip. I would like to draw the graph without these boundaries.
Is this possible? Or possible but not advisable for some reason?
Many thanks,
Raymond
geoplot and geoframe installed from the geoplot github site
https://github.com/benjann/geoplot
geoframe.ado
*! version 1.3.5 12oct2024 Ben Jann
geoplot.ado
*! version 1.3.5 17sep2024 Ben Jann
StataNow 19.5 MP on Windows 11
graph twoway command returned by "noisily" option:
Outputs

I am using the excellent tools provided in Ben Jann's geoplot and related commands. I have used the geoframe rclip tool to focus on my geographic area of interest. Everything works beautifully except that the graph plots the boundaries of the rectangle selected and clipped by geoframe clip. I would like to draw the graph without these boundaries.
Is this possible? Or possible but not advisable for some reason?
Many thanks,
Raymond
geoplot and geoframe installed from the geoplot github site
https://github.com/benjann/geoplot
geoframe.ado
*! version 1.3.5 12oct2024 Ben Jann
geoplot.ado
*! version 1.3.5 17sep2024 Ben Jann
StataNow 19.5 MP on Windows 11
Code:
geoframe query bbox if dist_sadhanw_KM<10, padding(5) mat box_sadhanw_10KM = r(limits) foreach toClip in state district subdistrict roads { frame `toClip': geoframe rclip box_sadhanw_10KM /// , into(`toClip'_sadhanw_10KM) } loc graph_name villages_LT10KM_sadhanw_clipped geoplot /// (line district_sadhanw_10KM if inlist(pc11_d_id,`levels_distID') /// , lwidth(medium) lcolor(black)) /// (line subdistrict_sadhanw_10KM /// , lpattern(dot) lwidth(medthin) lcolor(gs8)) /// (point village /// if inlist(pc11_id,"`sadhanw_pc11_id'") /// , msymbol(diamond)) /// (point village if dist_sadhanw_KM<10 /// & !inlist(pc11_id,"`sadhanw_pc11_id'") /// & town==0 /// , msize(medsmall) mcolor(navy)) /// (point village if dist_sadhanw_KM<10 /// & !inlist(pc11_id,"`sadhanw_pc11_id'") /// & town==1, /// msize(small) msymbol(triangle)) /// /// (label village place_name /// if (dist_sadhanw_KM<10 & town==1) | inlist(pc11_id,"`sadhanw_pc11_id'") /// , position(12)) /// (line roads_sadhanw_10KM if inlist(code,5115), lcolor(gs12)) /// (line roads_sadhanw_10KM if inlist(code,5112,5113,5114), lcolor(gs4)) /// , /// glegend(layout(1 "District boundary" 2 "Subdistrict boundary" 8 "Major road" 7 "Local road") /// position(ne) box) /// glegend(layout(5 "Town" 4 "Village") position(se) box) /// saving("output/fig/gph/`graph_name'.gph", replace) noisily
graph twoway command returned by "noisily" option:
Code:
graph twoway (line Y X in 3/330, cmissing(n) lpattern(solid) lcolor(black) lwidth(medium)) (line Y X in 331/658, cmissing(n) lcolor(gs8) lpattern(dot) lwidth(medthin)) (scatter Y X in 659/659, msymbol(diamond)) (scatter Y X in 660/713, mcolor(navy) msize(medsmall)) (scatter Y X in 714/714, mlabel(MLAB) msize(0) msymbol(i) mlabposition(12)) (line Y X in 715/1124, cmissing(n) lpattern(solid) lwidth(.15) lcolor(gs12)) (line Y X in 1125/2177, cmissing(n) lpattern(solid) lwidth(.15) lcolor(gs4)) (area Y X in 2178/2183, cmissing(n) nodropbase lalign(center) lpattern(solid) lwidth(.15) finten(100) fcolor(none) lcolor(gray)) (line Y X in 2184/2185, cmissing(n) lcolor(black) lpattern(solid) lwidth(medium) pstyle(p1)) (line Y X in 2186/2187, cmissing(n) lcolor(gs8) lpattern(dot) lwidth(medthin) pstyle(p2)) (line Y X in 2188/2189, cmissing(n) lcolor(gs4) lpattern(solid) lwidth(.15) pstyle(p7)) (line Y X in 2190/2191, cmissing(n) lcolor(gs12) lpattern(solid) lwidth(.15) pstyle(p6)) (scatter Y X in 2192/2197, mlabel(MLAB) mlabvposition(MLABPOS) mlabcolor(black) mlabsize(vsmall) msize(0) msymbol(i) mlabgap(0)) (area Y X in 2198/2203, cmissing(n) nodropbase lalign(center) lpattern(solid) lwidth(.15) finten(100) fcolor(none) lcolor(gray)) (scatter Y X in 2204/2204, mcolor(navy) msize(medsmall) pstyle(p4)) (scatter Y X in 2205/2207, mlabel(MLAB) mlabvposition(MLABPOS) mlabcolor(black) mlabsize(vsmall) msize(0) msymbol(i) mlabgap(0)) , legend(off) aspectratio(1, units) xscale(range(74.52512929562504 74.77266475337508) off) yscale(range(30.70949541310006 30.91568831890003) off) ylabels(none, labsize(vsmall)) xlabels(none, labsize(vsmall)) xtitle("", size(small)) ytitle("", size(small)) plotregion(style(none) istyle(none) margin(zero)) graphregion(style(none) istyle(none) margin(small)) bgcolor(white) saving("output/fig/gph/villages_LT10KM_sadhanw_clipped.gph", replace)
Comment