R语言pdf png画图

更新时间:2023-09-15 02:24:01 阅读量: 资格考试认证 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

pdf(\\

par(mfrow=c(6,3), mar=c(3,3,3,3), cex=1, bg=\g=”red\

for (i in 1:17) {

y <- log2(flower[,i])

hist(y, xlim=c(-10,15), main=colnames(flower)[i], col=\llow\box() }

dev.off()

>example<- read.csv(\ow.names = 1)

>library(gridExtra) >library(ggplot2)

>jpeg(\s = 600)

>p <- ggplot(example, aes(x=Genotype, color=Genotype)) >p = p + geom_boxplot(aes(y=Leaf.No.),fill=\RUE)

>p = p + theme_bw() + theme(axis.line = element_line(colour = \

+ panel.grid.major = element_blank(), panel.grid.minor = element_blank(),

+ panel.border = element_rect(color=\nel.background = element_blank())

>p = p + scale_color_manual(values=c('red', 'blue')) >p

notch went outside hinges. Try setting notch=FALSE. >a<- ggplot(example, aes(x=Genotype, color=Genotype))

>a = a + geom_boxplot(aes(y=Flowering.Time),fill=\otch=TRUE)

>a = a + theme_bw() + theme(axis.line = element_line(colour = \

+ panel.grid.major = element_blank(), panel.grid.minor = element_blank(),

+ panel.border = element_rect(color=\nel.background = element_blank())

>a = a + scale_color_manual(values=c('magenta', 'green')) >a

notch went outside hinges. Try setting notch=FALSE. >grid.arrange(p,a,nrow=1, ncol=2)

notch went outside hinges. Try setting notch=FALSE. notch went outside hinges. Try setting notch=FALSE. >dev.off() RStudioGD 2

本文来源:https://www.bwwdw.com/article/ur2h.html

Top