[R] Troubles in plotting to a postscript file (not to png)

pilchat pilchat at gmail.com
Mon Nov 29 13:29:19 CET 2010


Dear R users,

I am trying to produce some plots in a postscript file, but I am 
experiencing some issues. I open the device with

-----------------------------
setPS()
postscript (file='gs_mcmc_dust.ps',width=5*3,height=5*3,horizontal = 
FALSE, paper = "special",family = 
"ComputerModern",encoding="TeXtext.enc")#, onefile = FALSE
-----------------------------

(it's a 9x9 multiplot) and I close it with

-----------------------------
   dev.off()
-----------------------------

Here are my problems:

-) xlab=expression(paste(lambda,"(",~mu,m,")")) : it correctly prints 
the "mu" greek letter but it fails for the "lambda" letter, leaving a 
blank space
-) text(min(mchain[2,]),max(tdensity$y),substitute( T[disk,med] == tmed 
%+-% tstd (K),list(tmed=tmed,tstd=tstd)),pos=4,cex=1.5  ) : it prints 
everything, but the "+-" symbol and "(K)" overlap with the substitute 
for tmed and tstd respectively. How can I force a blank space between 
numbers and symbols? Also, how can I set the number of decimal digits 
for tmed and tstd? ( option(digits=4) does not work )
-) once I close the R session without saving it (I answer "n" when 
quitting), the content of the ps file is erased. Do you know why?

I solve these problems plotting to a PNG device, but a postscript file 
is what I need.

Can you help me, please?

Thank you very much in advance

Cheers

Gaetano



More information about the R-help mailing list