Dear Statalisters,
I have a smallish kind of problem with spmap that, despite trying many things, has proven impossible to resolve for me. Any help would be greatly appreciated.
My aim is to draw a proportional symbol map using spmap, wherein I superimpose two sets of events (the first in non-colonial contexts and the second in colonial contexts) on a world map that I downloaded from Natural Earth. Everything works out alright, except for the legend. While I managed to get spmap to show a legend, it is so small that it is simply impossible to read. So my question is: how can I control the size of a legend in spmap?
This is the code I used to draw the map:
spmap using worldcoordinates if admin !="Antarctica", ///
id(id_shp) fcolor(gs10) ocolor(white) ///
point(data("Geo-SDrefs.dta") x(longitude) y(latitude) proportional(count) by(colonial) fcolor(blue red) legenda(on) legshow(2 1))
I tried two things, both unsuccessfully. First, via the standard legend option, adding something like this to the code:
legend(symysize(*5) symxsize(*5) textwidth(*5) keygap(*5))
Second, I tried to manually increase the size of the keys and text using the graph editor, which works, but then also the markers on the map become (too) big).
Kind regards,
Micha Germann
I have a smallish kind of problem with spmap that, despite trying many things, has proven impossible to resolve for me. Any help would be greatly appreciated.
My aim is to draw a proportional symbol map using spmap, wherein I superimpose two sets of events (the first in non-colonial contexts and the second in colonial contexts) on a world map that I downloaded from Natural Earth. Everything works out alright, except for the legend. While I managed to get spmap to show a legend, it is so small that it is simply impossible to read. So my question is: how can I control the size of a legend in spmap?
This is the code I used to draw the map:
spmap using worldcoordinates if admin !="Antarctica", ///
id(id_shp) fcolor(gs10) ocolor(white) ///
point(data("Geo-SDrefs.dta") x(longitude) y(latitude) proportional(count) by(colonial) fcolor(blue red) legenda(on) legshow(2 1))
I tried two things, both unsuccessfully. First, via the standard legend option, adding something like this to the code:
legend(symysize(*5) symxsize(*5) textwidth(*5) keygap(*5))
Second, I tried to manually increase the size of the keys and text using the graph editor, which works, but then also the markers on the map become (too) big).
Kind regards,
Micha Germann
Comment