使用Terra增加轴,传奇和标题的栅格标签大小
如何使用Terra软件包增加传奇断裂,轴和情节标题标签的大小。 下面创建的图具有如此小的标签,我根本无法阅读它们。
r1 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
r2 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
r3 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
values(r1) <- runif(ncell(r1))
values(r2) <- runif(ncell(r2))
values(r3) <- runif(ncell(r3))
rr <- c(r1, r2, r3)
png(file.path(dir_ls$input, '250k', 'output', paste0(year_ref,'_map.png')),
width = 1000, height = 800)
terra::plot(rr,
type = "continuous",
range = c(0,1),
nr = 3,
main = c("r1","r2","r3"))
dev.off()
How can I increase the size of labels of legend break, axis and plot title using terra package.
The plot created below has such small labels that I can't read them at all.
r1 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
r2 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
r3 <- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, ymax=60)
values(r1) <- runif(ncell(r1))
values(r2) <- runif(ncell(r2))
values(r3) <- runif(ncell(r3))
rr <- c(r1, r2, r3)
png(file.path(dir_ls$input, '250k', 'output', paste0(year_ref,'_map.png')),
width = 1000, height = 800)
terra::plot(rr,
type = "continuous",
range = c(0,1),
nr = 3,
main = c("r1","r2","r3"))
dev.off()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这样:
我花了一点猜测工作才能确定在哪里放置
cex.main
,因为它似乎没有记录在 docs 。Like this:
It took a bit of guess work on my part to work out where to put
cex.main
as it does not seem to be documented but there is a list of other parameters in the docs.