I'm trying to make a map with a nicer legend. I would like for the legend to look something like this: https://ourworldindata.org/grapher/g...ry=ZAF~FRA~BRA
I.e. perhaps with more colours than what the map actually entails, and with these kinds of datapoints with numerical information.
Currently, I have this code:
Code:
spmap ineq_heim using "\Data\data_NUTS\1000_NUTS2_shp.dta", id(_ID) fcolor(Blues) title("") osize(vthin) legend(size(*1) position(1) row(1) ring(1) symx(*3.5) symy(*1.5) rowgap(-2) alignment(top) ) legorder(lohi) /// clmethod(eqint) eirange(${min} ${max}) clnumber(4) name(ineq, replace)
Array
I have managed to make the legend horizontal with the "row(1)", but trying to close the gap beween the colour boxes with 'rowgap(#)' seems not to do anything. Additionally I can't figure out how to force the legend information to appear below the colour boxes.
That is kind of the ideal solution I can think of to get as close as possible to the example that I link to - but I am very open to better looking solutions. It would be really cool if it could be a gradient bar, or something more gradient-adjacent.
0 Response to spmap: Horizontal legend with specified legend text options
Post a Comment