Printing from X11 window (was: Re: [R] Working with R batch)
Stuart Luppescu
s-luppescu at uchicago.edu
Thu Apr 6 19:03:34 CEST 2000
On 06-Apr-2000 Prof Brian D Ripley wrote:
> On Thu, 6 Apr 2000, Stuart Luppescu wrote:
>
>> On 06-Apr-2000 Prof Brian D Ripley wrote:
>> > If you want a hardcopy of the plot you can use any means you like, for
>> > example to print an x11() device's window via your window manager, or use
>> > dev2bitmap to grab the plot as a bitmap. Basically for R _on Unix_ the
>> > common format for printable plot files is PostScript, but there is also a
>> > pictex device. (A direct PDF device is at least a dream, and Windows has
>> > other devices based on its GDI and producing bitmap formats such as PNG
>> > and
>> > JPEG. No one has asked for a PCL (LaserJet) interface, which older
>> > programs
>> > such as S-PLUS support. People have talked about fig and similar formats
>> > too.)
>>
>> 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?
>
> First, you can do what the S-PLUS print button does by using dev.print, to
> postscript() or pictex() devices. It should (now) pick up points added by
> locator() or identify(). This does not (in either R or S-PLUS) save the
> screen, but replay the graphics calls to another device.
>
> Second, essentially shows you how to create a suitable call to dev.print to
> copy the current screen. Just omit the piping to gs. We are currently
> considering a new dev.print-like function which will get the x11 device
> width, height etc and copy the x11 device to postscript (and thence to a
> printer).
Thanks to all the help from Peter, Brian and Douglas. dev.print() does the job
very well!
Was this system named ``R'' because it ``Rocks'' or because it ``Rules''?
______________________________________________________________________
Stuart Luppescu -=-=- University of Chicago
$(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu
http://www.consortium-chicago.org/people/sl/sl.html
ICQ #21172047 AIM: psycho7070
A good memory does not equal pale ink.
>> Sent on 06-Apr-2000 at 12:00:11 with xfmail
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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