r-tmap / tmap

R package for thematic maps
https://r-tmap.github.io/tmap
GNU General Public License v3.0
862 stars 121 forks source link

Use tm_title across facets #940

Open mtennekes opened 3 weeks ago

mtennekes commented 3 weeks ago

Seems not possible yet...

Use case: series of maps (for animation) when panel.labels are not desirable (#937)

Rapsodia86 commented 3 weeks ago

And how to get rid of this title now? I did a package update and now I have the name of the variable used in tm_polygons(fill="%sig2",fill.scale = tm_scale_intervals(...)) on top of the map. It looks like from facet, but in this script there is no facet. #937

image

And previous: image

And here using some real data (same shapefile as in #938):

tm_shape(shp_in_sf) + tm_grid(n.y=2,lines = TRUE, crs = 4326, labels.cardinal = FALSE,labels.size = 0.5,labels.pos = c("left", "bottom"),lwd=0.75,col="grey75")+ tm_polygons(fill = "ID_label",col = "grey30",lwd=0.25, fill.scale = tm_scale_intervals(values = c("red","blue","black"), breaks = c(1,2,3,4), label.na = "NA"), fill.legend = tm_legend(reverse=TRUE,title="",bg.color = 'white')) image

tmap 3.99.9002

mtennekes commented 3 weeks ago

With the latest commit, I get this, so without panel:

image