ボックスプロットを作成するためにR ggplot2パッケージを使用しようとしています。
しかし、私はこのような伝説しか得られません。中央線のある小さなボックスを使用する代わりに、これらの凡例キーを単なる正方形に変更できる方法はありますか?
私が使用したコードは次のとおりです。
print(ggplot(mydata,aes(x=factor(sp),fill=factor(CommunityType),y=Abundance*100))+geom_boxplot(show_guide=FALSE)
+theme(axis.text = element_text(colour = "black",size=10))
+scale_y_continuous(" RA (%) ")+scale_x_discrete(limits=taxalist[1:5]," ")
+scale_fill_manual(name = "MY type", values = mycol[1:nmc])
+theme_bw() + guides(fill=guide_legend(title=NULL))+theme(legend.position=c(1,1),legend.justification=c(1,1))
+theme(legend.key = element_blank(),legend.key.size = unit(1.5, "lines"))
+theme( panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank()) )
申し訳ありませんが、ここで質問を説明するための画像を作成できません。