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: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,17 @@ Plot.plot({
38
38
39
39
`pyobsplot` can be installed with `pip`:
40
40
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
+
41
47
```sh
42
48
pip install pyobsplot
43
49
```
44
50
51
+
45
52
For usage instructions, see the [documentation website](https://juba.github.io/pyobsplot):
46
53
47
54
- 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
59
66
- Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
60
67
- Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
61
68
-[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)
63
70
- Works offline, no iframe or dependency to Observable runtime
64
71
- Caching mechanism of data objects if they are used several times in the same plot
65
72
- Custom JavaScript code can be passed as strings with the `js` method
Copy file name to clipboardExpand all lines: doc/getting_started.qmd
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ title: "Getting started"
9
9
`pyobsplot` can be installed with `pip`:
10
10
11
11
```sh
12
-
pip install pyobsplot
12
+
pip install pyobsplot[typst]
13
13
```
14
14
15
15
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
21
21
npm install -g pyobsplot
22
22
```
23
23
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
+
24
31
## Creating a plot
25
32
26
33
To use `pyobsplot`, you must import its `Plot` object with:
@@ -29,7 +36,7 @@ To use `pyobsplot`, you must import its `Plot` object with:
29
36
from pyobsplot import Plot
30
37
```
31
38
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.
33
40
34
41
So, starting with a very simple DataFrame:
35
42
@@ -99,7 +106,7 @@ The output format is configured by passing a `format` argument to `Plot.plot()`:
Copy file name to clipboardExpand all lines: doc/index.qmd
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ If you just want to try this package without installing it on your computer, you
83
83
- Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
84
84
- Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
85
85
-[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)
87
87
- Works offline, no iframe or dependency to Observable runtime
88
88
- Caching mechanism of data objects if they are used several times in the same plot
89
89
- 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
102
102
-[typst](https://typst.app) is used to convert HTML figures to PNG, SVG or PDF.
103
103
- Some code from the `jsdom` renderer has been adapted from [altair_saver](https://github.com/altair-viz/altair_saver).
104
104
- This documentation website is generated by [Quarto](https://quarto.org).
0 commit comments