要使得画出的图的纵坐标符合科学计数法,可以使用ggplot2包中的scale_y_scientific()函数。将该函数添加到ggplot()函数中的管道操作符中即可。

修改后的代码如下:

ggplot(data, aes(group, value, color = group)) + geom_boxplot(alpha=0.1, outlier.size=0, size=1, width=0.55, fill="transparent") + theme_bw(base_size = 16) + geom_jitter( position=position_jitter(0.2), size=1)+ theme(axis.text.x=element_text(angle=45,vjust=1, hjust=1))+ ggsci::scale_color_igv() + # 配色 xlab('') + ylab('') + facet_wrap( ~ variable, scales = 'free', nrow = 1) + scale_y_scientific(

ggplotdata aesgroup value color = group + geom_boxplotalpha=01 outliersize=0 size=1 width=055 fill=transparent + theme_bwbase_size = 16 + geom_jitter position=position_jitter02 size=1+ themeaxist

原文地址: http://www.cveoy.top/t/topic/ii3i 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录