#绘制折线图
lai %>% ggplot(aes(DAS,LAI))+
geom_line(color='red',
linetype="dotdash",
size=1.5)+
theme_bw()+
theme(element_blank())
对x轴绘制因子型折线图,group=1
#绘制折线图
lai %>% ggplot(aes(factor(DAS),LAI,group=1))+#group=1
geom_line(color='red',
linetype="dotdash",#更改线的类型
size=1.5)+
theme_bw()+
theme(element_blank())
#绘制折线图
lai %>% filter(80<=DAS&DAS<=130)%>%
ggplot(aes(factor(DAS),LAI,group=1))+#group=1
geom_line(color='red',
linetype=9,#更改线的类型
size=1.5)+
theme_bw()+
theme(element_blank())+
ylim(2,5)#修改y轴取值范围
#绘制折线图,设定y轴取值范围
lai %>% filter(80<=DAS&DAS<=130)%>%
ggplot(aes(factor(DAS),LAI,group=1))+#group=1
geom_line(color='red',
linetype=9,#更改线的类型
size=1.5)+
theme_bw()+
theme(element_blank())+
expand_limits(y=2)#扩展y轴取值使其包含某一值