[R] Importing vector graphics into R
hgoehlma at gmx.de
Thu Dec 9 08:44:27 CET 2004
Thanks for your suggestions!
Even though they are less than encouraging, I quickly want to give you
the rational why I have asked this. Actually I was inspired by Paul
Murrell's useR presentation - have a look at the very last slide of his
presentation which you can find at
http://www.stat.auckland.ac.nz/~paul/Talks/useR2004.pdf - If only this
kind of functionality could be generalized to any vector graphics...
Oh, well, still pixmap gives a solution for the moment and that's ok.
Roger Bivand wrote:
> On Tue, 7 Dec 2004, Hinrich GÃ¶hlmann wrote:
>>Dear R users,
>>I know of the possibility to import bitmaps via the nice pixmap library.
>> But if you later on create a PDF it is somewhat disappointing to
>>have such graphics bitmapped. Is there a trick (via maps?) to import a
>>vector graphic and have them plotted onto a graph? My searching attempts
>>in the searchable r-help archive did not seem to result in anything
> No, nothing obvious. If you have an Xfig file - or convert to one from PS,
> you may be able to extract the lines with their attributes by hand (the
> file is just text, so you can "see" the vector graphics), and write an R
> function to plot them (rescaled) onto the device if you need a single
> graphical element many times. Otherwise, perhaps edit the graphics file
> after R has completed its work. None of the vector map formats is easy to
> use for this kind of trick, especially because you probably need
> attributes on the lines (thickness, colour).
More information about the R-help