0

ここに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 つの回帰を取得するにはどうすればよいですか?

4

1 に答える 1