[R] plotting to Postscript and margins
Bastian A.
bastianra at gmail.com
Fri Nov 14 22:37:13 CET 2008
Hi,
I am using R 2.8.0 on Kubuntu 8.04.
My problem is that is can't get my postscript
output to work the same way as on screen output.
If I copy the device after plotting dev.print()
font sizes don't match and text sticks out of the figure margins.
When I use postscript() to create a new plotting device R
fails to plot with the error:
Error in plot.new() : figure margins too large
How do I generate high resolution or resolution independent output
that resembles what I see on screen?
I am aware of the thread:
http://tolstoy.newcastle.edu.au/R/help/04/01/0428.html
but it did not help me to resolve the problem, as I don't have a
copy of "Modern Applied Statistics with S" at hand
-- if that is what was referred to by MASS. Additionally
printing directly to postcript generates an error.
my plotting code is:
par(font=2)
par(las=2)
par(cex.lab=2)
par(mar=c(1, 12, 12, 14) +0.2)
par(font.axis=2)
par(font.lab=2)
par(cex.axis=2)
image(1:ncol(fcs),1:nrow(fcs),t(fcs),col=color_fun(5), breaks=
breaks,xlab="",ylab="",xaxt="n",yaxt="n")
{here it fails:"Error in plot.new() : figure margins too large"
when plotting to a device created with postscript().
Plotting to the default X11 and using dev.print() works aside from
the messed up layout.}
daylab <- c("D3","D7","D10","D14","D28","D60")
axis(side=3,labels=daylab,at=1:ncol(fcs),tick=FALSE)
axis(side=2,labels=probe.2.symbol(pid),at=1:nrow(fcs),tick=FALSE)
par(font.axis=1)
par(font.lab=1)
axis(side=4,labels=format(pp,scientific=TRUE,digits=2),at=1:nrow(fcs),tick=FALSE)
par(las=0)
Thanks,
Bastian
More information about the R-help
mailing list