求大神帮忙呀,我话分组刻面图,要删掉一个刻面的图例,结果使用guides(fill=FALSE)却没有删掉图例,请问这是怎么回事呀?
p9 <- ggplot(PT9, aes(x=温度, y=频率,group=1,colour=体感热度)) +
geom_point(size=2,shape=21) + #加点
geom_smooth(method = "lm",se = FALSE,size=0.2) +
labs(x="白天平均温度(℃)",y="频率")+
ylim(0.00,1.00) +
scale_x_continuous(breaks = seq(16,27,1))+
facet_wrap(~体感热度)+
guides(fill=FALSE)+
tem
p1 <- ggplot(PT1, aes(x=温度, y=频率,group=1,colour=体感热度)) +
geom_point(size=2,shape=21,fill="white") + #加点
geom_smooth(method = "lm",se = FALSE,size=0.2) +
labs(x="白天平均温度(℃)",y="")+
ylim(0.00,1.00) +
scale_x_continuous(breaks = seq(16,27,1))+
facet_wrap(~体感热度)+
tem
#合并两张图
grid.newpage()
pushViewport(viewport(layout = grid.layout(1,2)))
vplayout <- function(x,y){viewport(layout.pos.row = x, layout.pos.col = y)}
print(p9,vp = vplayout(1,1))
print(p1,vp = vplayout(1,2))