我很难以更清晰的方式显示此饼图的切片。持续的阴影很难遵循。如何使用对比色彼此相邻的切片着色?例如,S3conv会更好用红色,蓝色和黄色代替两个绿色和一个蓝色......非常感谢!
图解说明: 每个饼图代表一个实验图。 - Rot.Herb 总重量=图中所有杂草重量的总和
我用于此图表的代码是
library(ggplot2)
library(tidyr)
library(dplyr)
weedweights<-data%>%
select(-ends_with("No"))%>%
gather(key=species, value=speciesmass, DIGSAWt:UnknownmonocotWt)%>%
mutate(realmass= (10*speciesmass) / samplearea.m.2.)%>%
group_by(Rot.Herb, species)%>%
summarize(avgrealmass=mean(realmass, na.rm=TRUE))%>%
filter(avgrealmass != "NaN")%>%
ungroup()
ww2 <- weedweights %>%
group_by(Rot.Herb) %>%
mutate(totalweedweight=sum(avgrealmass)) %>%
ungroup()
ggplot(weedweights, aes(x=1, y=avgrealmass, fill=species, order=avgrealmass)) +
geom_bar(position = "fill", stat="identity") +
facet_wrap(~ Rot.Herb) +
coord_polar("y") +
ggtitle("Weedbiomass by crop phase and herbicide regime")+
theme(plot.title = element_text(size=20, face="bold", vjust=2))+
theme(axis.text.x = element_blank(), axis.text.y = element_blank(), axis.ticks = element_blank())+
xlab("Weed dry biomass (kg per ha)")+
ylab("Crop phase and herbicide regime")
这是data