-
Notifications
You must be signed in to change notification settings - Fork 125
Description
I am looking for a way to place the legend labels in tm_scale_intervals() at the intersection of colors, instead of in their middle: Labelling boundaries for color changes instead of bins. For example in the Happy Planet Index figure from the tmap v4 introduction (https://r-tmap.github.io/tmap/articles/01_tmap_intro_v4.html#suggestions), instead of labelling "1 to 2", "2 to 3" etc., label 0, 1, 2, 3 etc., such as in tm_scale_continuous(), but while retaining a discrete color scale.
This could be highly useful for the use of tmap in the physical climate sciences, which typically use discrete color scales with labeling as in tm_scale_continuous(). Often, the cartopy Python package is used there.
I understand this may be a bigger change to the code. Any help appreciated. May be there is a workaround, or specific lines of code that would need adaptation.