Skip to content

Commit e6ec515

Browse files
committed
doc: update install instructions
1 parent ed11f81 commit e6ec515

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,17 @@ Plot.plot({
3838

3939
`pyobsplot` can be installed with `pip`:
4040

41+
```sh
42+
pip install pyobsplot[typst]
43+
```
44+
45+
To use `pyobsplot` in [jupyter lite](https://jupyter.org/try-jupyter/lab/) or [marimo](https://marimo.io) you must install it without the `typst` dependency, which is not yet compatible with [pyodide](https://pyodide.org/en/stable/):
46+
4147
```sh
4248
pip install pyobsplot
4349
```
4450

51+
4552
For usage instructions, see the [documentation website](https://juba.github.io/pyobsplot):
4653

4754
- See [getting started](https://juba.github.io/pyobsplot/getting_started.html) for a quick usage overview.
@@ -59,7 +66,7 @@ If you just want to try this package without installing it on your computer, you
5966
- Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
6067
- Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
6168
- [Pandas](https://pandas.pydata.org) and [polars](https://pola.rs) DataFrame and Series objects are serialized using [Arrow](https://arrow.apache.org) IPC format for improved speed and better data type conversions
62-
- Works with Jupyter notebooks and Quarto documents
69+
- Works with Jupyter notebooks, Quarto documents (all renderers), Jupyter lite and Marimo notebooks (widget renderer only)
6370
- Works offline, no iframe or dependency to Observable runtime
6471
- Caching mechanism of data objects if they are used several times in the same plot
6572
- Custom JavaScript code can be passed as strings with the `js` method

doc/getting_started.qmd

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: "Getting started"
99
`pyobsplot` can be installed with `pip`:
1010

1111
```sh
12-
pip install pyobsplot
12+
pip install pyobsplot[typst]
1313
```
1414

1515
If you want to use output formats like PNG or SVG, you must have a working installation of [node.js](https://nodejs.org/en) and you must install the `pyobsplot` npm package globally or locally:
@@ -21,6 +21,13 @@ npm install pyobsplot
2121
npm install -g pyobsplot
2222
```
2323

24+
To use `pyobsplot` in [jupyter lite](https://jupyter.org/try-jupyter/lab/) or [marimo](https://marimo.io) you must install it without the `typst` dependency, which is not yet compatible with [pyodide](https://pyodide.org/en/stable/):
25+
26+
```sh
27+
pip install pyobsplot
28+
```
29+
30+
2431
## Creating a plot
2532

2633
To use `pyobsplot`, you must import its `Plot` object with:
@@ -29,7 +36,7 @@ To use `pyobsplot`, you must import its `Plot` object with:
2936
from pyobsplot import Plot
3037
```
3138

32-
To create a plot, call the `Plot.plot` method with a plot specification: a Python dictionary with a syntax nearly identical as the JavaScript one.
39+
To create a plot, call the `Plot.plot` method with a plot specification: a Python dictionary with a syntax nearly identical as the JavaScript one.
3340

3441
So, starting with a very simple DataFrame:
3542

@@ -99,7 +106,7 @@ The output format is configured by passing a `format` argument to `Plot.plot()`:
99106
Plot.plot(Plot.auto(penguins, {"x": "flipper_length_mm"}), format="png")
100107
```
101108

102-
To save the plot to a file, you can add a `path` argument. The file extension will determine the output type, which can be HTML, PNG, SVG or PDF:
109+
To save the plot to a file, you can add a `path` argument. The file extension will determine the output type, which can be HTML, PNG, SVG or PDF:
103110

104111
```python
105112
# Save plot as SVG
@@ -114,4 +121,3 @@ With the "widget" format, export can only be done to HTML files.
114121
## Learn more
115122

116123
To go further, see the [usage](usage.qmd) page.
117-

doc/index.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ If you just want to try this package without installing it on your computer, you
8383
- Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
8484
- Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
8585
- [Pandas](https://pandas.pydata.org) and [polars](https://pola.rs) DataFrame and Series objects are serialized using [Arrow](https://arrow.apache.org) IPC format for improved speed and better data type conversions
86-
- Works with Jupyter notebooks and Quarto documents
86+
- Works with Jupyter notebooks, Quarto documents (all renderers), Jupyter lite and Marimo notebooks (widget renderer only)
8787
- Works offline, no iframe or dependency to Observable runtime
8888
- Caching mechanism of data objects if they are used several times in the same plot
8989
- Custom JavaScript code can be passed as strings with the `js` method
@@ -102,4 +102,3 @@ If you just want to try this package without installing it on your computer, you
102102
- [typst](https://typst.app) is used to convert HTML figures to PNG, SVG or PDF.
103103
- Some code from the `jsdom` renderer has been adapted from [altair_saver](https://github.com/altair-viz/altair_saver).
104104
- This documentation website is generated by [Quarto](https://quarto.org).
105-

0 commit comments

Comments
 (0)