hello i'm trying to plot multiple image (.png) and plot as a single image using mfrow(). i have already image1.png image2.png image.png image4.png and a can't plot them in single fig1.png? thank you Said FILAHI morocco
(no subject)
2 messages · Said Filahi, Jim Lemon
Hi Said,
Try this:
# some data please, maestro
fatdat<-data.frame(age=sample(12:50,100,TRUE),BMI=runif(100,12,40))
# get your graphic device going
png("fatplots.png",width=800,height=800)
# get a 2x2 division of the device space
par(mfrow=c(2,2))
# start plotting
plot(age~BMI,data=fatdat)
hist(fatdat$BMI)
plot(sort(fatdat$BMI),type="l")
fatdat$agecat<-cut(fatdat$age,breaks=c(10,20,30,40,50))
barplot(by(fatdat$BMI,fatdat$agecat,FUN=mean))
dev.off()
Jim
On Fri, Jul 24, 2015 at 10:05 PM, Said Filahi <sa.filahi at gmail.com> wrote:
hello
i'm trying to plot multiple image (.png) and plot as a single image using
mfrow().
i have already image1.png image2.png image.png image4.png and a can't plot
them in single fig1.png?
thank you
Said FILAHI
morocco
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.