5
我想使用plotmath
在ggplot2
圖中創建一個包含前導上標的軸。上軸標籤創建標工作得很好,就像這樣:在plotmath表達式中帶前標(w/ggplot2)
require(ggplot2)
ggplot(mtcars, aes(x=disp, y=mpg)) +
geom_point() +
ylab(expression(x[y]))
不過,我想有我軸線標籤中讀取「Y(上標)X」 - 在邏輯上,這將是^yx
,但這將不會解析:
Error: unexpected '^' in: "
geom_point() +
ylab(expression(^"
有沒有辦法在語句的開頭強制上標?
也許可以使用一個空的加倍報價。 '表達式(「」^ y * x)「 –