Skip to content

postscript( does not save the plot

10 messages · Sarah Goslee, Marc Schwartz, Alaios +2 more

#
Hi,
On Tue, Aug 16, 2011 at 1:32 PM, Alaios <alaios at yahoo.com> wrote:
A reproducible example would be a lot more help.
And on what OS, version of R, etc? This could be a system problem,
so we need to know what that system is. sessionInfo() would be
helpful.
Sarah
#
On Aug 16, 2011, at 12:32 PM, Alaios wrote:

            
You did not create an EPS file. See ?postscript and pay attention to the fourth paragraph under Details:

The postscript produced for a single R plot is EPS (Encapsulated PostScript) compatible, and can be included into other documents, e.g., into LaTeX, using \includegraphics{<filename>}. For use in this way you will probably want to use setEPS() to set the defaults as horizontal = FALSE, onefile = FALSE, paper = "special". Note that the bounding box is for the device region: if you find the white space around the plot region excessive, reduce the margins of the figure region viapar(mar=).


HTH,

Marc Schwartz
#
Not sure what output you get in the first case. You don't need:

  ps.options=setEPS()

just:

  setEPS()


Using:

set.seed(1)
test <- matrix(runif(500*500), 500)

setEPS()

postscript(file = "exponcoverapprox.eps")

boxplot(test[30, 1:500], test[90, 1:500], test[150, 1:500], test[210, 1:500],
        test[270, 1:500], test[330, 1:500], test[390, 1:500],
        names = c("1", "3", "5", "8", "10", "13", "1"), outline = FALSE,
        ylim=c(0.01, 50), log = "y", xlab = "xvalue", ylab = "yvalue",
        boxwex=0.5, pars = list(whisklwd = 0, staplelwd = 0))

dev.off()


I get the attached output which seems to be OK.

Marc
-------------- next part --------------
On Aug 17, 2011, at 10:02 AM, Alaios wrote:

            
1 day later
#
On Aug 19, 2011, at 8:06 AM, Alaios wrote:

            
The code you posted does not parse. There is a lissing closing quote  
in the ylab argument.
#
Sometimes when I have a script that does not close out a graphics
device correctly (using PDF), I sometimes have problems opening up the
file.  I use the following command to make sure all graphics devices
are closed before generating plots after a script has not terminated
correctly:

graphics.off()

Try this command before generating your plots.
On Fri, Aug 19, 2011 at 8:06 AM, Alaios <alaios at yahoo.com> wrote:

  
    
#
On Aug 19, 2011, at 9:08 AM, Alaios wrote:

            
It has never been reproducible because you have ignored the request 3  
days ago to supply the 'test' object. You have also ignores the  
request that you post sessionInfo()