Closed caldwellst closed 2 months ago
Countries with the problem have legends on the inside of the plot, which doesn't work: https://github.com/OCHA-DAP/hdx-signals/blob/main/src-static/update_iso3_map_settings.R#L259. Also would be good to check what is happening in the Somalia example with the numerous white dots.
I think easiest solution would be that the legend placement is simply vertical and left unless the map has higher than 3/2 width/height ratio.
so if w:h ratio is > 3/2 we go with landscape and put legend on bottom ?
what dimensions should we go with for landscape? whats the width limitation?
portrait: 4 x 6 in (w x h) landscape: ?
ok was misunderstanding -- we always landscape now:
but i suppose if w/h ration is >3/2 we can still put legend on bottom -- probably a horizontal legend?
Yep, definitely horizontal! And yes, you got it sorry, meant alternative was bottom and horizontal!
In some instances, we get legend overlap in maps.
Placement is defined in the assets in
update_iso3_map_settings.R
. We are now no longer using the dynamic sizing for maps (they are all 6x4 inches). It might be worth simply placing the legend at the bottom/top or left/right of a plot rather than placing within the plot for a few countries.