|
ggplot2这个X轴坐标轴怎么设置才能把所有的日期在坐标轴上都显示出来
数据
vl = round(rnorm(20,80,10))
dt = as.Date(1:20, origin="2021-01-01")
df = data.frame(dt,vl)
作图
ggplot(df,aes(dt,vl)) +
geom_line(lty = 1,lwd = 1.5,col ="pink") +
scale_y_continuous(breaks=c(seq(10,120,10)),limits = c(10,110))+
theme(axis.text.x = element_text(size = 8,angle = 90))
|
|