[R] Unsqueezing Stacked Figures
Gundala Viswanath
gundalav at gmail.com
Thu Jun 26 16:35:06 CEST 2008
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__
- Gundala Viswanath
Jakarta - Indonesia
More information about the R-help
mailing list