Message-ID: <20140818062555.GA20565@d1stkfactory>
Date: 2014-08-18T06:25:55Z
From: Thomas Levine
Subject: Making my own graphics device
In-Reply-To: <2A78B637-70FC-4F8A-8A85-1C6C27092190@comcast.net>
Thanks for the further tips! I'll look at the R Internals manual,
the other built-in devices, and the RSvgDevice package. And I'm
still looking for the S source code, but I have a feeling that I'll
wind up writing the device before I find the source code.
> It may be useful to look at existing interfaces to an HPGL device in other graphics applications. One such application is xgraph and here is the C code for one implementation:
>
> http://xgraph.sourcearchive.com/documentation/12.1-3/hpgl_8c-source.html
>
> The other option might be to enlist an external program such as GNUPLOT that has an HPGL output and use it as a driver to which you send an image in a file format that R can produce.
While this would be a good idea for pretty much any other file format,
it probably will make things more complicated for HPGL as the structure
of base R graphics is kind of exactly the same as HPGL.
Tom