JuliaInterop / RCall.jl

Call R from Julia
Other
319 stars 59 forks source link

Feature Request: show/display methods for R plots like ggplot2 #514

Open schlichtanders opened 10 months ago

schlichtanders commented 10 months ago

It would be great if RCall would support rich outputs for plots, so that inside Pluto.jl RCall plotting works. (PythonCall has such support, but I guess Python's matplotlib is quite different from R's ggplot2).

schlichtanders commented 10 months ago

Looking into IRKernel, the jupyter support, it seems a combination of the R package repr and R Base evaluate is needed.

Here is the entry point for IRKernel https://github.com/IRkernel/IRkernel/blob/master/R/execution.r#L313-L321

frankier commented 10 months ago

Looks this PR does something related: https://github.com/JuliaInterop/RCall.jl/pull/409

schlichtanders commented 10 months ago

The PR gives a macro, which actually relies on being a macro in that it can change the code.

I would rather appreciate if the show and display functions could directly be overloaded to support rich html output