私はggplot2を使用して、9つのファセットを含む図をプロットしています。各ファセットは2つの変数間の関係を表し、統計的に有意な結果を表示するファセットに星印を付けます。これにより、' 'が付いた9つのファセットのうち2つだけになります。ただし、9つのファセットすべてに注釈が表示されることになります。
どうすればこれを修正できますか?
library(ggplot2)
Sig<-c("","*","","","","","","*","") # Only the second and the second to last facets should receive significance stars.
Data.annot<-data.frame(unique(Aspects),Sig)
qplot(Labels,Es,data=Data1) + geom_pointrange(aes(x=Labels,y=Es,ymin=Low,ymax=Up)) + geom_hline(yintercept=0, linetype="dashed") + coord_flip() + facet_wrap(~Aspects, scales="free") + geom_text(data=Data.annot, aes(x= 0.5, y= 1, label = Sig)) + scale_y_continuous("Correlation coefficient\n(effect size)",limits=c(-0.5,1),breaks=c(-0.5,0,0.5,1.0)) + scale_x_discrete("")