这是一个ggplot:
ggplot(data.and.factors.prov,aes(x=Design.Complexity,y=FP,shape=factor(All.interactions))) +
stat_summary(fun.data=mean_cl_normal,position=position_dodge(width=0.5)) +
geom_blank() +
geom_smooth(method='lm',se=F,formula=y~x,colour='black') +
scale_shape_manual(values=c(17,3,16,6,15,4),
name='Interactions',
labels=c('No interactions','All possible interactions','Randomly picked interactions\nand direct effects')) +
labs(x='Design.complexity',y='FP',title='Under Bonferroni Correction') +
opts(axis.line = theme_segment(colour = "black"),
panel.grid.major = theme_blank(),
panel.grid.minor = theme_blank(),
panel.border = theme_blank(),
panel.background = theme_blank()) + ylim(0.03,0.06)
如果我按组替换形状:
按颜色替换形状/组时:
ggplot(data.and.factors.prov,aes(x=Design.Complexity,y=FP,colour=factor(All.interactions))) +
stat_summary(fun.data=mean_cl_normal,position=position_dodge(width=0.5)) +
geom_blank() +
geom_smooth(method='lm',se=F,formula=y~x,colour='black') +
scale_shape_manual(values=c(17,3,16,6,15,4),
name='Interactions',
labels=c('No interactions','All possible interactions','Randomly picked interactions\nand direct effects')) +
labs(x='Design.complexity',y='FP',title='Under Bonferroni Correction') +
opts(axis.line = theme_segment(colour = "black"),
panel.grid.major = theme_blank(),
panel.grid.minor = theme_blank(),
panel.border = theme_blank(),
panel.background = theme_blank()) + ylim(0.03,0.06)
同时使用颜色和组时
为什么我在使用 shape 时得到 3 个回归,但在使用 color 时只得到 1 个回归?
使用 color 时如何获得 3 个彩色回归,使用 shape 时如何仅获得 1 个回归?