您有任何想法如何解决这个问题吗?
library("ggplot2")
x <- seq(1,10,1)
y <- sin(x)
z <- c("1", "1", "2", "2", "2", "1", "2", "3", "3", "3")
df <- data.frame(x,y,z)
p <- ggplot(df, aes(x,y, color=z))
p + geom_point() +
labs(
color = expression(
paste(
"Catalyst Loading \n(mg cm"^{-2}*")"
)
)
)