读取后的数据框里列名称改成了有下标的,绘图时不显示!
请问绘图时标签无法显示上下标应该如何解决?
上标
library("ggplot2")
# Create a DataFrame For Plotting
DF <- data.frame(X = rnorm(10),
Y = rnorm(10))
# Create ggplot2 ScatterPlot with SuperScripted
# value of Label of Axis.
ggplot(DF,aes(X, Y))+
geom_point(size = 8, fill = "green",
color = "black", shape = 21)+
xlab(bquote(X-Axis^superscript))+
ylab(bquote(Y-Axis^superscript))
下标
library("ggplot2")
# Create a DataFrame For Plotting
DF <- data.frame(X = rnorm(10),
Y = rnorm(10))
# Create ggplot2 ScatterPlot with SubScripted
# value of Label of Axis.
ggplot(DF,aes(X, Y))+
geom_point(size = 8, fill = "green",
color = "black", shape = 21)+
xlab(bquote(X-Axis[subscript]))+
ylab(bquote(Y-Axis[subscript]))
https://www.geeksforgeeks.org/superscript-and-subscript-axis-labels-in-ggplot2-in-r/
tctcab 这是图链接: https://pan.baidu.com/s/1YFDlKb9w0k6LCnxDOe6d8A?pwd=9q2u 提取码: 9q2u 复制这段内容后打开百度网盘手机App,操作更方便哦