Closed asjadnaqvi closed 1 year ago
I now did some work on legend()
. It is now possibly to specify label()
within each layer to define how legend keys from that layer are generated/labeled, and then in legend()
there is a layout()
option to put legends from different layers together. Here's an example:
local url http://fmwww.bc.edu/repec/bocode/i/
geoframe create regions `url'Italy-RegionsData.dta, id(id) coord(xcoord ycoord) shpfile(`url'Italy-RegionsCoordinates.dta)
geoframe create capitals `url'Italy-Capitals.dta, coord(xcoord ycoord)
geoplot ///
(area regions fortell, color(Reds) lc(gs6) finten(60) ///
label("@lb-@ub")) ///
(point capitals size, discrete color(Blues) ///
label(1 "Below 50k")) ///
(pcarrowi 4139067.2 906564.1 4973321.5 469578.9, color(BlueViolet) ///
label("Agrigento-Alessandria")) ///
, legend(bplace(sw) layout( ///
- "{bf:Fortell}" 1 | ///
- "{bf:City size}" 2 ///
- "{bf:Other stuff}" 3)) ///
tight
I am closing this assuming that the new composite legends solve the issue.
The following command generates this map:
First, it is great that legends can be binned and continuous and can be placed inside and outside the plot regions! This was a huge issue with spmap that forced them to be inside. Several suggestions:
spmap
has alegstyle()
option that allows users to customize how the legends are defined. For example, with just showing ranges through a hyphen:0 - 10
etc. It will be great if these can be ported over.