我有这段代码,它假设要编写一个由许多小子图组成的文件。
par(mar=c(1,1,1,1))
par(mfrow=c(3,3))
filepath <- paste(getwd(),'/','BP_',product_name,'.jpg',sep="")
jpeg(filepath)
boxplot(normalized.price_shipping~rank, data=data.selected, main=toupper("Normalized Price By Rank Levels"), font.main=3, cex.main=1.2, xlab="Rank Levels", ylab="Price+Shpping", font.lab=3, col="darkgreen")
#dev.off()
#filepath <- paste(getwd(),'/','BP_normalized.seller_feedback_score_',product_name,'.jpg',sep="")
#jpeg(filepath)
boxplot(normalized.seller_feedback_score~rank, data=data.selected, main=toupper("normalized.seller_feedback_score By Rank Levels"), font.main=3, cex.main=1.2, xlab="Rank Levels", ylab="normalized.seller_feedback_score", font.lab=3, col="darkgreen")
#dev.off()
#filepath <- paste(getwd(),'/','BP_normalized.seller_positive_feedback_percent~rank_',product_name,'.jpg',sep="")
#jpeg(filepath)
boxplot(normalized.seller_positive_feedback_percent~rank, data=data.selected, main=toupper("normalized.seller_positive_feedback_percent By Rank Levels"), font.main=3, cex.main=1.2, xlab="Rank Levels", ylab="normalized.seller_positive_feedback_percent", font.lab=3, col="darkgreen")
#dev.off()
#filepath <- paste(getwd(),'/','BP_keywords_title_assoc~rank_',product_name,'.jpg',sep="")
#jpeg(filepath)
boxplot(keywords_title_assoc~rank, data=data.selected, main=toupper("keywords_title_assoc By Rank Levels"), font.main=3, cex.main=1.2, xlab="Rank Levels", ylab="keywords_title_assoc", font.lab=3, col="darkgreen")
#dev.off()
#filepath <- paste(getwd(),'/','BP_log10_seller_feedback_score~rank_',product_name,'.jpg',sep="")
#jpeg(filepath)
boxplot(log10(seller_feedback_score)~rank, data=data.selected, main=toupper("seller_log10_feedback_score By Rank Levels"), font.main=3, cex.main=1.2, xlab="Rank Levels", ylab="seller_feedback_score", font.lab=3, col="darkgreen")
dev.off()
但是,在写入文件系统的文件中,我只能看到我需要查看的 5 个箱线图中的最后一个图。知道为什么吗?