|
各位大神,帮忙解答一下啦!非常感谢!!!
我的原始数据是:-0.002024561 1.401557 1.202661 -0.7015133 -0.684164 -0.6242453 -0.5922705
然后我用下面代码画图:
data1 <- read.table(file = "mean.txt",header = FALSE,sep = "\t")
data1 <- t(data1)
data1 <- cbind(c("L-0","L-7","L-14","L-21","L-28","L-35","L-42"),data1)
data1 <- data.frame(data1)
x.lable <- c("L-0","L-7","L-14","L-21","L-28","L-35","L-42")
ggplot() + geom_line(data=data1, mapping=aes(x=X1, y=X2,group=1), colour="black",stat = "identity") + scale_x_discrete(limits = x.lable)
得到的图形为
纵坐标为单个值而不是连续的刻度?这是什么原因?要怎么解决?求大神帮忙解答,谢谢啦~
|
|