[R-pkg-devel] plot graph (png, svg, eps, pdf, vdx, ok tikz) to device

Rainer Krug R@iner @ending from krug@@de
Thu May 24 08:45:59 CEST 2018


Yes - I a now using grImport and eps (after trying svg and grImport2). I still need a temporary file, but I can live with that for the moment.

Thanks,

Rainer


> On 15 May 2018, at 14:00, Rainer M. Krug <Rainer at krugs.de> wrote:
> 
> 
> 
> Von meinem iPhone gesendet
> 
>> Am 15.05.2018 um 13:54 schrieb Johannes Ranke <johannes.ranke at jrwb.de <mailto:johannes.ranke at jrwb.de>>:
>> 
>> Hi,
>> 
>> have a look at the grImport package. It can import eps, so at least you get a
>> vector based graph.
> 
> Sounds interesting- I’ll check it out tomorrow and report back if it works well.
> 
>> 
>> Alternatively, you may want to check grImport2 which imports svg.
>> 
>> Kind regards,
>> 
>> Johannes
>> 
>> Am Dienstag, 15. Mai 2018, 13:22:16 CEST schrieb Rainer Krug:
>>> Hi
>>> 
>>> I asked the question at stack exchange yesterday (
>>> https://stackoverflow.com/q/50325139/632423 ) and did not get a response so
>>> far, so I repost it here:
>>> 
>>> ####
>>> 
>>> I have the following situation: I use an external command (plantuml -
>>> http://plantuml.com/ ) to create a graph. This is done via R by using a
>>> (my) package ( https://github.com/rkrug/plantuml ). The resulting graph can
>>> be a file (png, svg, eps, pdf, vdx or LaTeX/Tikz with or without preamble)
>>> or I can send the image to stdout, using the same formats.
>>> 
>>> Now I want to plot this graph as R-like as possible, i.e. in a graphic
>>> device. At the moment I am using a temporary file, which I display using
>>> readPNG() and grid::grid.raster() which works, but I am not that happy with
>>> this approach as
>>> 
>>>   • I have to use a temporary file which I would like to avoid, and
>>>   • it is a raster format and I would prefer a vector format.
>>> 
>>> My question is therefore:
>>> 
>>>   • Is there a way to display any of the vector formats in a graphics device
>>> in R? • Can I pipe stdout (the result from the call to plantuml) directly
>>> into the device (or through any function) without having to create an
>>> intermediate file?
>>> 
>>> ####
>>> 
>>> Thanks for any [pointers,
>>> 
>>> Rainer
>>> 
>>> 
>>> --
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
>>> UCT), Dipl. Phys. (Germany)
>>> 
>>> University of Zürich
>>> 
>>> Cell:       +41 (0)78 630 66 57
>>> email:      Rainer at krugs.de
>>> Skype:      RMkrug
>>> 
>>> PGP: 0x0F52F982
>> 
>> 
>> --
>> Johannes Ranke
>> Wissenschaftlicher Berater
>> https://jrwb.de/contact
> 
> ______________________________________________
> R-package-devel at r-project.org <mailto:R-package-devel at r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel <https://stat.ethz.ch/mailman/listinfo/r-package-devel>
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

University of Zürich

Cell:       +41 (0)78 630 66 57
email:      Rainer at krugs.de
Skype:      RMkrug

PGP: 0x0F52F982




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <https://stat.ethz.ch/pipermail/r-package-devel/attachments/20180524/f3cf3870/attachment.sig>


More information about the R-package-devel mailing list