[R] Unsqueezing Stacked Figures

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Thu, 26 Jun 2008 23:35:06 +0900


Hi,

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

Top -> scatter plot
Bottom -> density plot.

However these two figures are squeezed
together as rectangle figures each.
(i.e. the y axes are compressed)

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:
(I can also provide the figure if needed).

__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="My Plot",
             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 Thu 26 Jun 2008 - 14:49:07 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 Thu 26 Jun 2008 - 15:00:56 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