Printing from X11 window (was: Re: [R] Working with R batch)

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Apr 6 17:16:52 CEST 2000


Stuart Luppescu <s-luppescu at uchicago.edu> writes:

> I would really like to know how to do this. One thing (maybe the only thing) I
> miss about working with S-Plus is the ability label points interactively using
> identify() in X11() and then produce a postscript plot of the result for
> printing just by clicking on the ``PRINT'' button in the window. Prof. Ripley
> mentions printing the contents of the window using your window manager, but my
> window manager doesn't permit this. Dev2bitmap is not an option, as I need
> postscript. I like pictex, but I don't see how to output the contents of an X11
> window as pictex. Isn't there a way to do this?
> 
> (I'm running R 1.0.0 on RedHat Linux 6.2 (intel).)

dev.print() can do this:

----------------
> plot(1:6,1:6)
> identify(1:6,1:6)
warning: no point with 0.25 inches
[1] 4 5
> dev.print()
X11 
  2 
> [^Z]
[1]+  Stopped                 misc/r-release/BUILD/bin/R
[pd at blueberry pd]$ gv Rplots.ps 
[pd at blueberry pd]$ %
misc/r-release/BUILD/bin/R

---------------

The slightly sticky bit is setting up options so that you get
satisfactory text size and aspect ratio on the output. The defaults
are not too bad for exploratory purposes, but getting something to
included in LaTeX was tricky.

[It seems like it is necessary to tweak both the X11 parameters and
the postscript ones if you want to diddle with things like the
pointsize. If so, then there's a buglet somewhere, but I can't really
nail it down.]

And yes, we probably do want a print function/button at some point.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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