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)))
)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744933099a4601855.html
评论列表(0条)