-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Description
I need help to locate the legend of my maps outside when I have several layers. How can I do this?
Here is the code I'm using:
tm_shape(predictors) +
tm_polygons(c('precipitation', 'temperature', 'footprint', 'cropland'),
fill_alpha = 0.9,
col='grey45', col_alpha = 0.2, lwd = 0.25,
fill.scale = list(
tm_scale_intervals(n = 6, style = 'pretty',
midpoint = 0,
values = 'brewer.pu_bu',
value.na = 'grey80'),
tm_scale_intervals(n = 6, style = 'pretty',
midpoint = 0,
values = 'brewer.yl_or_rd',
value.na = 'grey80'),
tm_scale_intervals(n = 6, style = 'pretty',
midpoint = 0,
values = 'brewer.purples',
value.na = 'grey80'),
tm_scale_intervals(n = 6, style = 'pretty',
midpoint = 0,
values = 'brewer.pu_bu_gn',
value.na = 'grey80')),
fill.legend = tm_legend(#title='',
item.space = 0,
reverse=T,
frame=F,
frame.lwd = 0.1,
bg.color = 'white',
position = tm_pos_out())
) +
tm_layout(panel.show = FALSE) +
tm_crs(crs=st_crs(4326)) +
tm_options(component.autoscale=F)
And this is the map I get, see the legend overlapped:
Metadata
Metadata
Assignees
Labels
No labels