We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tm_facets
I want to add compass and scale_bar only once while using tm_facets. Here is an example code
library(tmap) library(stars) library(terra) #Read some data tif = system.file("tif/L7_ETMs.tif", package = "stars") x = rast(tif) #Plot it using tmap r package tm_shape(x) + tm_raster(style="quantile")+ tm_facets(nrow = 3) + tm_layout(panel.labels = names(x), legend.outside=T, legend.outside.position = "right", legend.position= c("center", "center"), legend.text.size = 1, legend.format = list(digits = 2, text.separator = "-"))+ tm_compass(position = c("RIGHT", "BOTTOM"))+ tm_scale_bar(text.size = 1, position = c("RIGHT", "BOTTOM"))
As you can see in the output, all the facets are having compass and scale_bar. How can I add compass and scale_bar in only one facet?
The text was updated successfully, but these errors were encountered:
Hi @bappa10085, you can try this:
#Read some data tif = system.file("tif/L7_ETMs.tif", package = "stars") x = terra::rast(tif) #Plot it using tmap r package tm_shape(x) + tm_raster(style="quantile")+ tm_facets(nrow = 3) + tm_layout(panel.labels = names(x), attr.outside = T,attr.outside.position = "bottom" ,attr.just="right", legend.outside=T, legend.outside.position = "right", legend.position= c("left", "top"), legend.text.size = 0.8,legend.title.size = 0.9, legend.format = list(digits = 2, text.separator = "-"))+ tm_compass(position = c("left", "top"))+ tm_scale_bar(text.size = 1, position = c("RIGHT", "top"))
I cant figure out how to move it to the right ouside despite defining it but you now have just 1 scale bar and north arrow
Sorry, something went wrong.
No branches or pull requests
I want to add compass and scale_bar only once while using
tm_facets
. Here is an example codeAs you can see in the output, all the facets are having compass and scale_bar. How can I add compass and scale_bar in only one facet?
The text was updated successfully, but these errors were encountered: