Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 ggplot 的 x 和 y 轴上写下以下表达式:LE 通量 [W m-1]。我的解决方案是:
xlab(expression("LE flux [W m""~"^{-2}"~]")).
我不明白为什么它不起作用。感谢任何帮助!
我认为你应该这样做labs(x = expression('blah'))
labs(x = expression('blah'))
library(dplyr) library(ggplot2) ggplot(mtcars, aes(wt, mpg))+ geom_point() + labs(x = expression('LE flux [W'~ m^-2 ~']'), y = expression('LE flux [W'~ m^-2 ~']'))