[R] Source code for R graphics devices

From: Ted Harding <Ted.Harding_at_nessie.mcc.ac.uk>
Date: Tue 11 Jul 2006 - 05:52:50 EST


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@nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861
Date: 10-Jul-06                                       Time: 20:52:46
------------------------------ XFMail ------------------------------

______________________________________________
R-help@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 Received on Tue Jul 11 05:58:28 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 11 Jul 2006 - 08:15:26 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.