[R] Source code for R graphics devices

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Mon Jul 10 21:52:50 CEST 2006


Hi Folks,

I'm trying to locate the source code for a (typical)
R graphics device, in order to study how it's done.

The underlying reason is that I'm thinking of trying
to create a graphics device for 'pic' (the diagram
drawing component of [g]troff).

I thought the xfig device would be a good place to
look, since the format of an xfig file is similar in
nature (though very different in detail) to 'pic' code.

When, in R, I type "xfig" to see the R code, I get the
line

  .Internal(XFig(file, old$paper, old$family, old$bg, old$fg,
      old$width, old$height, old$horizontal, old$pointsize, 
      old$onefile, old$pagecentre))

so I tried to locate the code for the Internal function "Xfig".

I can't seem to find it!

So where should I be looking?

Also -- a more general question on this topic -- presumably
any R graphics device is driven by a "stream" of raw graphics
data in some presumably device-independent format, which it
then translates. Where can I find this, and information on
its structure?

With thanks, and best wishes,
Ted.

PS Total newbie on this front!

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 10-Jul-06                                       Time: 20:52:46
------------------------------ XFMail ------------------------------



More information about the R-help mailing list