You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think tm_legend(frame = FALSE) inside tm_raster() doesn't work as expected, however, it works as usual for tm_polygon().
It starts to work okay when a map has both tm_raster() and tm_polygon() layers added in a single map.
However, the option works when used inside the tm_polygon()
poly_Frame_F<- tm_shape(World) +
tm_borders(col="area",
col.legend= tm_legend(frame=F, title="Area \n(Poly Frame = F)"))
poly_Frame_F#> [tip] Consider a suitable map projection, e.g. by adding `+ tm_crs("auto")`.#> This message is displayed once per session.
Frame appears as expected when tm_legend(frame = TRUE)
I think
tm_legend(frame = FALSE)
insidetm_raster()
doesn't work as expected, however, it works as usual fortm_polygon()
.It starts to work okay when a map has both
tm_raster()
andtm_polygon()
layers added in a single map.The following is an example I could reproduce.
The following plot doesn’t remove the legend frame when
tm_legend(frame = FALSE)
insidetm_raster()
However, the option works when used inside the tm_polygon()
Frame appears as expected when
tm_legend(frame = TRUE)
However, the options start to work according to the first map layer setting of
tm_legen()
when the two layers are combined. Examples are as follows.Created on 2025-05-25 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: