我正在使用ggplot2
包来绘制物种丰度的堆积区域。
我的代码:
#Aggragate 2 column
x=IBTS[,3:4]
Datehour=paste(IBTS$Date.,IBTS$Time.)
Date<-strptime(Datehour,"%d/%m/%Y %H:%M")
#Add a new column with the date
IBTS$Date
IBTS<-cbind(IBTS,Date)
#Plotting the data
p<-ggplot(IBTS,aes(x=Date,y=Number.of.Particles.))
p+geom_area(aes(fill=Selection.set.),position="stack")+
theme_bw()+ scale_fill_brewer(palette="Blues")
我得到这个情节:
我有一个简单的问题:在 Janv 上。30,我的数据框上有 NA 值,但在我的图中没有考虑这些值。
有人有什么主意吗?