[R] How do I save a figure with postcript()

hzi@uol.com.br hzi at uol.com.br
Sun Jan 6 03:45:22 CET 2002


Hi-

	I have this small data set (this is from Glantz`s
Biostatistics textbook, from the Hebbel et al. paper):

0 0 0 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 3 3 4 4 5 5 5 5 6 7 9 10 11
	
	I wanted to produce a histogram+density plot, so I did this
(BTW, I got this from the r-help archives, but it would be nice if
someone included it some of the documents), after scanning the data
set:

histo <- hist(hebbel, xlim = range(dest$x), xlab = "x", ylab = "density", freq=FALSE)
> dens <- lines(dest,lty=2)
	
	Then, I went on to save it as a .ps and an .eps file. As I
understood in the R-intro.pdf:

> postscript("/home/synthespian/r_graphics_test_plot.ps", horizontal=FALSE, height=5, pointsize=10)
> postscript("/home/synthespian/r_graphics_test_plot.eps", horizontal=FALSE, height=5, pointsize=10)

	But this produced a file with 0 Kb (as loaded with xv)!
	And what are some good parameters - height and pointsize?
	Obviously, this is the way to go about it. 
	How do I do it?

	TIA,
	Regs,
	HL

PS: BTW, xlisp-stat has this _nice_ feature which is when you produce
the graphic, you can just click on a widget so save it, change colors,
etc. I wish this were present on R.


	

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list