R 比例散点图

R 比例散点图,r,ggplot2,scatterpie,R,Ggplot2,Scatterpie,我有这些数据 structure(list(year = c("2018", "2018", "2018", "2018", "2018", "2018", "2018", "2018", "2018", "2018", "2018", "2018"), m

我有这些数据

structure(list(year = c("2018", "2018", "2018", "2018", "2018", 
"2018", "2018", "2018", "2018", "2018", "2018", "2018"), month = c(1, 
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), Avdischarge = c(906.5947917, 
511.2469444, 364.0697222, 268.3026389, 141.5931944, 142.0445486, 
37.53111111, 34.68916667, 35.50809028, 26.94083333, 40.400381945, 
312.0436806), IndustrialCompound = c(0.729166666666667, 0.815789473684211, 
0.818181818181818, 0.771428571428571, 0.736842105263158, 0.761904761904762, 
0.780487804878049, 0.829268292682927, 0.8, 0.780487804878049, 
0.738095238095238, 0.731707317073171), Pharmaceutical = c(0.145833333333333, 
0.105263157894737, 0.113636363636364, 0.142857142857143, 0.131578947368421, 
0.119047619047619, 0.121951219512195, 0.0975609756097561, 0.114285714285714, 
0.146341463414634, 0.166666666666667, 0.195121951219512), Pesticide = c(0.125, 
0.0789473684210526, 0.0681818181818182, 0.0857142857142857, 0.131578947368421, 
0.119047619047619, 0.0975609756097561, 0.0731707317073171, 0.0857142857142857, 
0.0731707317073171, 0.0952380952380952, 0.0731707317073171), 
    TotalOvershootings = c(0.48, 0.558823529411765, 0.619718309859155, 
    0.538461538461538, 0.612903225806452, 0.591549295774648, 
    0.561643835616438, 0.554054054054054, 0.538461538461538, 
    0.577464788732394, 0.617647058823529, 0.694915254237288)), row.names = 37:48, class = "data.frame")


 
我想画一些零散的图,但我没有把馅饼弄对。 我用了这个:

pie<-ggplot()+geom_scatterpie(aes(x=month, y=2, group=type, r = TotalOvershootings/5), 
                                        cols= c("IndustrialCompound", "Pharmaceutical", "Pesticide"),alpha= 0.7, color=NA,
                                        data= counts)

pie显然,您只需要使用
coord\u fixed()


您能用
dput
提供一份可用的数据副本吗?请完成,刚刚编辑了我的问题,顺便说一句,我认为使用切面比每月连续绘制一次效果更好。
ggplot()+
geom_scatterpie(aes(x=month, y=2, r=TotalOvershootings/1.35),
                cols= c("IndustrialCompound", "Pharmaceutical", "Pesticide"), 
                alpha= 0.7, color=NA, data= counts)+
coord_fixed()