[R] Problems with combining plots

johnhj jharris at web.de
Mon Mar 23 12:52:06 CET 2009


I have still the same problem... As you said I tried with par(mfrow=c(2,1))
and par(mfrow=c(1,2)) but without success. Could R compiler be the problem ?



Wills, Kellie wrote:
> 
> par(mfrow=c(1,1)) will give you just one panel.  Try par(mfrow=c(2,1)) or
> par(mfrow=c(1,2)).
> 
> 
> -----Original Message-----
> From: r-help-bounces at r-project.org on behalf of johnhj
> Sent: Sun 3/22/2009 10:50 AM
> To: r-help at r-project.org
> Subject: [R]  Problems with combining plots
>  
> 
> Hii,
> 
> I will combine some plots. Like this example here
> http://www.statmethods.net/advgraphs/layout.html I tired to do it for 2
> plots but without success.
> 
> Here is my code:
> 
> test<-read.table(file="D:/file.txt")
> space<-read.table(file="D:/space.txt")
> 
> space$gruppe <- 502*rep(1:6, each=7)
> x<- c(test$V1)
> y<- c(test$V2)
> 
> par(mfrow=c(1,1)) 
> 
> png(filename = "D:/example.png", width = 640, height = 480, pointsize =
> 12,
> bg = "white",  res = NA)
> 
> boxplot(V2 ~ gruppe , data = space , col = "lightgray",boxwex=0.2)
> plot(panel.first=grid(ny=NULL,nx=NULL),x,y, xlab = "Zeit(sec)", ylab
> ="Datenrate(MBit(sec))",ylim=c(0,40), col ="purple", type ="l", main
> ="combined plots",lwd=2)
> 
> dev.off()
> 
> 
> What is the mistake in my code ? 
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problems-with-combining-plots-tp22646692p22646692.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-combining-plots-tp22646692p22658673.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list