library(reticulate)

python <- "~/.virtualenvs/python-3.7.7-venv/bin/python"
if (file.exists(python))
  use_python(python, required = TRUE)

plotly figures should be rendered on .show()

import plotly.express as px
fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
fig.show()

plotly figures should be implicitly rendered on print

import plotly.express as px
fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
fig


rstudio/reticulate documentation built on Oct. 29, 2024, 8:07 a.m.