# PyCall / RCall in notebook showing graph displayed by the other language?

**URL:** https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624
**Category:** Visualization
**Created:** [March 20, 2021, 8:35pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624 "2021-03-20T20:35:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)
#### Post date: [March 20, 2021, 8:35pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624/1 "2021-03-20T20:35:32Z")

</div>

Is it possible to call for instance ggplot2 in R, and have the graph be shown in a Julia Jupyter notebook? Any example code somewhere?

---

<div class="post-metadata">

### Author: ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)
#### Post date: [March 21, 2021, 5:22pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624/2 "2021-03-21T17:22:44Z")

</div>

Yes. See the function `ijulia_setdevice` in `RCall.jl/src/ijulia.jl`

---

<div class="post-metadata">

### Author: ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)
#### Post date: [March 21, 2021, 6:02pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624/3 "2021-03-21T18:02:53Z")

</div>

PyPlot.jl calls Python’s PyPlot with Pycall according to the documentation.

I’ll try these maybe tomorrow.

---

<div class="post-metadata">

### Author: ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)
#### Post date: [March 21, 2021, 8:13pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624/4 "2021-03-21T20:13:48Z")

</div>

Thanks for the answer, but I stopped trying to do R integration for my docker image due to the lousy way R package installation works on Debian, so I won’t be trying this. I’ll mark it as the answer anyway.
