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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--- 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---
On Thu, 20 Nov 1997, 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?My experience with xfig and R/Splus has been very good. I do not know of any other freely available drawing programs that handle postscript/eps files as well as xfig, and export drawings in such a usefull variety of formats. If you want to include a postscript file into an xfig drawing, first open a blank canvas to work on, then select the button on the left titled `picture object', which will bring a file-selector dialog from which you can select the ps/eps file you wish to import (after indicating the size for the imported file by use of the mouse). It is usually that easy. I recommend converting the ps image to an eps (encapsulated post script) with a tool such as ps2epsi (included with ghostscript, I believe), which removes much of the white space around the plot that is usually left when the plot is written to a ps file. Good luck. (The man page, though a little disorganized, is a good resource) Matt Nelson =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--- 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---
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 SimpsonBill: 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---
Bill Simpson <wsimpson at uwinnipeg.ca> writes:> 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?Er - horrible compared to what? (Just curious. Personally, I've found it a bit tedious, but it's hard to think up how to achieve similar functionality with a better user interface. It's not a paint program, but that is part of the design: that identifiable elements can be selected and moved about.)> 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?As others have pointed out, once the postscript is generated, it is not easy to fix. For that other language which is not entirely unlike R, there has for quite a while existed a graphics device which outputs in xfig's native format, which you can then modify and convert to PostScript. Written by me some 6 years ago and revised (and substantially improved) by Gary Houston a year or two back. Once the structure of a generic graphics driver for R has materialized, it should be fairly easy to cook up an R driver for the xfig format (in particular since it won't necessarily have to deal with the same idiosyncracies in the underlying graphics code). Perhaps it's easy to do it already - I haven't been looking too closely at the current graphics drivers. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--- 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---