Skip to content

Commit

Permalink
doc: typo and headings in usage
Browse files Browse the repository at this point in the history
  • Loading branch information
juba committed May 5, 2024
1 parent f4cee50 commit f24c645
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/usage.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ You can see a live version of this example in the following Colab notebook: [![]

## Saving plots to file

Generated plots can be savec to a file. To do this, just add a `path` argument to your generator call:
Generated plots can be saved to a file. To do this, just add a `path` argument to your generator call:

```{python}
#| eval: false
Expand All @@ -434,6 +434,8 @@ op = Obsplot(renderer="jsdom")
op(Plot.lineY([1,2,3,2]), path="path_to/file.svg")
```

### jsdom renderer

When using the `jsdom` renderer, charts can be saved either as SVG or HTML files : 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.

In any case, you can also use Plot's `figure` option to force the output to be wrapped in `<figure>`:
Expand All @@ -450,4 +452,6 @@ op({
)
```

### widget renderer

When using the `widget` renderer, plots can only be saved to full HTML files. These files retain interactivity features such as tooltips. To embed widgets into an HTML website or document, Quarto documents can be more practical.

0 comments on commit f24c645

Please sign in to comment.