【发布时间】:2020-07-01 17:59:42
【问题描述】:
我已经运行了这段代码。给出显示的结果。我现在想为每个堆叠条的每个单独类别添加计数。
dat$SU<-as.factor(dat$SU)
#INVENTORY PER SU
ggplot(dat, aes(x=SU,fill=factor(SCIENTIFIC_NAME)))+
geom_bar(width=0.5)+xlab("Sampling Unit (SU)")+
ylab("Count")+labs(fill="SCIENTIFIC NAME")+
ggtitle("Inventory per sampling unit (SU) by species")+
scale_x_discrete(breaks=c(1,2,3,4,5,6,7,8,10,11,15))
【问题讨论】:
-
嗨,OP,您看到这些问题的答案了吗? Question 1。 Question 2.