R-beta: edit figs with xfig?

Ted Harding Ted.Harding at nessie.mcc.ac.uk
Thu Nov 20 23:53:53 CET 1997


On 20-Nov-97 Bill Simpson wrote:
> Question for R users under unix:
> Do you ever edit figs created by R using xfig or some other program?  I
> tried to edit a figure with xfig (a program which I find quite horrible
> by
> the way) and it said it couldn't read it in.  I guess xfig has no
> capability of reading postscript files?
> 
> Can anyone tell me how to do it, or perhaps suggest another freeware
> structured drawing program for use in touching up postscript figs output
> by R?
> 
> Thanks very much for any help.
> 
> Bill Simpson

Bill: I know of no general way whatever of editing a PostScript file except
by opening it in a text editor and using your grey matter (no more than you
can expect to modify any program by sending its output to some
viewer/editor).

Only if R's PS graphics output has a very well defined and rigid structure
could you expect that to be possible, I think, and I never heard of a
program which could do such a thing.

You could always convert the PS to one of the bitmap formats (using e.g.
ghostscript) and try editing the bitmap with one of a number of suitable
programs, but that doesn'r sound like a happy way to spend the day.

A better option, if it is possible, would be to output an R graphic as a
"pic" file (preprocessor to [g]troff, which can then be used to generate PS
output). "Pic" files are easy to edit once you've got the hang of it;
but you can lose a number of PostScript's capabilities if you're
restricted to "pic" (e.g. shading arbitrary closed areas). To implement
this, I suppose "pic" would have to be one of R's graphics device drivers.

(Tony Dusoir's "SC" program uses pic as the primary graphics output format,
mediated through the "grap" language; the resulting "pic" file is displayed
using "troff | ghostscript" on screen, and can be converted to a PS file. It
seems to work quite well. "Pic" is also one of the device options in
gnuplot, so the gnuplot code could be used as a model if needed).

Hope this helps,
Ted.

--------------------------------------------------------------------
E-Mail: Ted Harding <Ted.Harding at nessie.mcc.ac.uk>
Date: 20-Nov-97                                       Time: 22:53:53
--------------------------------------------------------------------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---
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