我在ggarrange中设置了10个子图,其中有一个常见的图例。我有10组这10个子图,总计100张图。我将如何对通用图例设置一个限制,以便可以在所有10个已布置的地块中进行比较?
一个子图和排列的图的代码如下所示。
我的栅格图的填充称为“差异”,它是普通图例的填充。
当我尝试将10个已布置的地块(全部100个)布置到另一个ggarrange中时,它不会加载或提供错误消息。
Wallyce3GillFiveOut<-DF[18799:18979,4:8]
attach(Wallyce3GillFiveOut)
TenWallyce3<-ggplot(Wallyce3GillFiveOut,aes(Time,Position))+
geom_raster(aes(fill=Differential))+
scale_fill_gradient(high="red",low="grey")+
xlim(0,60)+
theme_classic()
PlotWallyce3<-ggarrange(OneWallyce3,TwoWallyce3,ThreeWallyce3,FourWallyce3,FiveWallyce3,SixWallyce3, SevenWallyce3, EightWallyce3, NineWallyce3, TenWallyce3, common.legend = Differential,ncol=2,nrow=5,
labels=c("Gill One - In",
"Gill One - Out",
"Gill Two - In",
"Gill Two - Out",
"Gill Three - In",
"Gill Three - Out",
"Gill Four - In",
"Gill Four - Out",
"Gill Five - In",
"Gill Five - Out"),
label.y =1.1,label.x=0)
annotate_figure(PlotWallyce3,fig.lab="Wallyce 0626")