You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/index.qmd
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ If you just want to try this package without installing it on your computer, you
90
90
- Python `date` and `datetime` objects are automatically converted to JavaScript `Date` objects
91
91
- Plots can be defined with a dictionary, a call to a `Plot` mark function, or with `kwargs`. See [alternative syntaxes](usage.qmd#alternative-syntaxes).
92
92
- Works with Jupyter notebooks and Quarto HTML documents. Plots without legends are also supported in PDF and docx outputs with the `jsdom` renderer.
93
+
- Plots generated by the `jsdom` renderer can be saved to SVG or HTML files
You can see a live version of this example in the following Colab notebook: [](https://colab.research.google.com/github/juba/pyobsplot/blob/main/examples/interactivity.ipynb)
419
424
425
+
426
+
## Saving plots to file
427
+
428
+
When using the `jsdom` renderer, generated plots can be savec to a file. To do this, just add a `path` argument to your generator call:
By default Plot generates charts as SVG, but if a legend, title, subtitle or caption is present, the SVG is wrapped in a `<figure>` HTML tag. When using the `path` option, `pyobsplot` will warn you if you try to save an HTML output to a SVG file.
438
+
439
+
In any case, you can also use Plot's `figure` option to force the output to be wrapped in `<figure>`:
0 commit comments