[R] Resizing Stacked Figures

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Tue, 17 Jun 2008 10:05:24 +0900


Hi,

I have two figures where
I stacked together as one PNG.

Top -> scatter plot
Bottom -> density plot.

However the density curve on the bottom was cut-off on its tip.

Is there a way I can resize the figure?
So that it can show proportional and
complete plots?

The code I have is the following:

__BEGIN__

trellis.device("png", color=TRUE)
png(out_fname)

par(mfrow = c(2,1))

scat <- plot(gexp.arr,

              type = "l",
              col="red",
              xlab="Sample",
              ylab="Exp Lvl",
              main=paste(genm,"-",desc, ", Mean=",ge_mean, ", SD=",ge_sd, ",
              Krt=",ge_kurt, ", AIC=",aic, ", BIC=",bic, sep=""),
              split=c(1,1,1,2), more = TRUE
      )

gehist <- hist(gexp.arr,
              col="blue",
              main = "Density Plot",
              xlab = "Exp Level",
              freq=FALSE

  )

lines(density(gexp.arr), col = "red",lwd = 3, split=c(1,2,1,2)) dev.off()
__END__


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. Received on Tue 17 Jun 2008 - 01:33:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 17 Jun 2008 - 02:30:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive