Closed richierocks closed 3 years ago
I see the same thing when setting self_contained = TRUE
in facet_trelliscope()
.
OK, I figured it out.
When you create the trelliscope, you need to set the path
argument in facet_trelliscope()
.
ggplot(Orange, aes(age, circumference)) +
geom_line() +
facet_trelliscope(vars(Tree), path = "trelliscope/trees")
Then you add a cell that calls browseURL()
to open the plot in a new browser tab. The file is always called index.html
and it lives in the directory that you specified with the path
argument.
browseURL("trelliscope/trees/index.html")
Here's an update of the notebook with a working example. trelliscope-in-jupyter-notebook.ipynb.zip
I'm not sure if this is a trelliscopejs problem or a Jupyter notebook problem, but I thought I'd ask here first.
When you include a trelliscope in a Jupyter notebook, it doesn't display.
Here's an example notebook trelliscope-in-jupyter-notebook.ipynb.zip.
When executing the cell to make the trelliscope, I see
but then no plot appears.
I'm aware of the trick for R markdown files, where you set the
self_contained
andlib_dir
files in the YAML header, then specify thepath
argument in the call tofacet_trelliscope()
. I can't find any documentation on an equivalent for Jupyter notebooks.Is there a way to make the trelliscopes show? I don't mind whether they are inline or open in a separate browser pane.