R画折线图

library(ggplot2)
library(gcookbook)
data <- read.table("test.xls",header=T,sep="\t")
ggplot(data,aes(x=Species, y=CDS))+ geom_line(color="red") + geom_point(size=2, shape=16,color="red") + ylim(0,1750) + theme_classic() + scale_x_discrete(limits=c("darer","datra","ctide","meamb","onmac","cycar","caaur","sirhi","sians","sigra"))
#scale_x_discrete修改x轴坐标,不改变图的数值
#theme_classic显示X、Y轴线

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *