最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

r - Math expression in terra legend title - Stack Overflow

programmeradmin3浏览0评论

I do not find a way to write a mathematical expression in the legend title of a terra base plot. Specifically, the mathematical expression contains a fraction with some text at the numerator and denominator, as in the example below. I have tried several commands such as expression and bquote, but I am unable to obtain what I need.

x <- rast(matrix(1:25, nrow=5, ncol=5))
plot(x,
     legend = T,
     plg = list(title = expression(frac(a,b)))
     )

发布评论

评论列表(0)

  1. 暂无评论