Open MarcSkovMadsen opened 2 years ago
I just tried this Pane, not publishing a new reference example as we are reworking this part and it may change, but I'll record in this issue some instructions to create an example with this pane.
panel
, rpy2
, r-ggplot2
and r-lazyeval
from conda-forgefrom rpy2.robjects.vectors import IntVector
from rpy2.robjects.packages import importr, data
from rpy2 import robjects
import rpy2.robjects.lib.ggplot2 as ggplot2
base = importr('base')
stats = importr('stats')
datasets = importr('datasets')
mtcars = data(datasets).fetch('mtcars')['mtcars']
rnorm = stats.rnorm
dataf_rnorm = robjects.DataFrame({'value': rnorm(300, mean=0) + rnorm(100, mean=3),
'other_value': rnorm(300, mean=0) + rnorm(100, mean=3),
'mean': IntVector([0, ]*300 + [3, ] * 100)})
gp = ggplot2.ggplot(mtcars)
pp = gp + \
ggplot2.aes_string(x='wt', y='mpg') + \
ggplot2.geom_point()
import panel as pn
pn.extension()
pn.pane.RGGPlot(pp)
As a part of adding docstrings to Panes I discovered the
RGGPlot
pane.I was not aware of its existence and guess other users would be in the same situation.
Please add a reference notebook or gallery example.