[R] MetaPost device?

Ross Ihaka ihaka at stat.auckland.ac.nz
Thu Apr 6 21:49:04 CEST 2000

On Thu, Apr 06, 2000 at 05:35:57PM +0200, Peter Dalgaard BSA wrote:
> It's not terribly hard (said the man who people have been nagging to
> do an xfig driver for years...) if you know the file format to
> generate. You need to figure out how to do do a rather small
> set of primitives to do text, polylines, etc., and then fill routines
> to do those into a fairly simple framework. Take a look at the
> existing drivers to get an impression of what is required.

I've started on an XFig driver a couple of times ...  However some
time ago I discovered a rather sweet little gadget called pstoedit.
It converts PostScript into various editable forms.  I use it to produce
xfig files, but there are options for PC formats too.  Have a look at


The major problem with writing a new graphics driver is implementing
text drawing with arbitrary orientation, justification and clipping.
I don't know how hard this would be in MetaPost.

One option (which I've discussed a bit with Paul) would be to use the
GNU vector fonts in place of native device fonts -- this would really
simplify writing device drivers.  The problem is that the GNU fonts
don't have a complete Latin1 encoding.  On the other hand they do have
Cyrillic and Kanji.

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