[R] graphs - saving and multiple

Uwe Ligges ligges at statistik.uni-dortmund.de
Sat Dec 11 21:26:11 CET 2004


stephenc wrote:
> Hi
>  
> I am doing something like this:
>  
> hist(maximumPitch, xlab="Maximum Pitch in Hertz")
>  
> which produces a nice histogram but what do I do to get two or three,
> etc on one page?

For more than one on a page, see ?par, in particular its argument "mfrow".


> I want to save the resulting file to an eps.  I can find:
>  
>  
> postscript("ex.eps")
>  
> which I then run something like my  hist above and then 
>  
>     dev.off()    
>  
> but I don't get anything in my eps file!

Starting the device with postscript(),  plotting with hist() and closing 
with dev.off() should produce something, if you haven't done very 
strange things.

Try:
  postscript("ex.eps")
  hist(1:10)
  dev.off()

Now look into the eps file. Is it still empty? Then something is wrong 
with either your postscript interpreter or your setup of R.


Uwe Ligges



> Thanks.
>  
> Stephen 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list