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
+31-20Lines changed: 31 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,23 +36,34 @@ Plot.plot({
36
36
37
37
## Installation and usage
38
38
39
-
`pyobsplot` can be installed with `pip`:
39
+
`pyobsplot` can be installed with `uv` or `pip`:
40
+
41
+
::: {.panel-tabset}
42
+
43
+
## uv
44
+
45
+
```sh
46
+
uv add pyobsplot[typst]
47
+
```
48
+
49
+
## pip
40
50
41
51
```sh
42
52
pip install pyobsplot[typst]
43
53
```
44
54
55
+
:::
56
+
45
57
To use `pyobsplot` in [JupyterLite](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
58
47
59
```sh
48
60
pip install pyobsplot
49
61
```
50
62
51
-
52
63
For usage instructions, see the [documentation website](https://juba.github.io/pyobsplot):
53
64
54
-
-See [getting started](https://juba.github.io/pyobsplot/getting_started.html) for a quick usage overview.
55
-
-See [usage](https://juba.github.io/pyobsplot/usage.html) for more detailed usage instructions.
65
+
- See [getting started](https://juba.github.io/pyobsplot/getting_started.html) for a quick usage overview.
66
+
- See [usage](https://juba.github.io/pyobsplot/usage.html) for more detailed usage instructions.
56
67
57
68
If you just want to try this package without installing it on your computer, you can open an introduction notebook in Google Colab:
58
69
@@ -62,25 +73,25 @@ If you just want to try this package without installing it on your computer, you
62
73
63
74
**Features:**
64
75
65
-
-Syntax as close as possible to the JavaScript one
66
-
-Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
67
-
-Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
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
69
-
-Works with Jupyter, JupyterLite and Marimo notebooks as well as in Quarto documents
70
-
-Works offline, no iframe or dependency to Observable runtime
71
-
-Caching mechanism of data objects if they are used several times in the same plot
72
-
-Custom JavaScript code can be passed as strings with the `js` method
73
-
-Python `date` and `datetime` objects are automatically converted to JavaScript `Date` objects
76
+
- Syntax as close as possible to the JavaScript one
77
+
- Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)
78
+
- Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files
79
+
-[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
80
+
- Works with Jupyter, JupyterLite and Marimo notebooks as well as in Quarto documents
81
+
- Works offline, no iframe or dependency to Observable runtime
82
+
- Caching mechanism of data objects if they are used several times in the same plot
83
+
- Custom JavaScript code can be passed as strings with the `js` method
84
+
- Python `date` and `datetime` objects are automatically converted to JavaScript `Date` objects
74
85
75
86
**Limitations:**
76
87
77
-
-Plot interactions (tooltips, crosshair...) are only available with the "widget" format (<https://github.com/juba/pyobsplot/issues/16>).
78
-
-Very limited integration with IDE (documentation and autocompletion) for Plot methods. (<https://github.com/juba/pyobsplot/issues/13>)
88
+
- Plot interactions (tooltips, crosshair...) are only available with the "widget" format (<https://github.com/juba/pyobsplot/issues/16>).
89
+
- Very limited integration with IDE (documentation and autocompletion) for Plot methods. (<https://github.com/juba/pyobsplot/issues/13>)
79
90
80
91
## Credits
81
92
82
-
-[Observable Plot](https://observablehq.com/@observablehq/plot?collection=@observablehq/plot), developed by [Mike Bostock](https://observablehq.com/@mbostock) and [Philippe Rivière](https://observablehq.com/@fil) among others.
83
-
-The widget is developed thanks to the [anywidget](https://anywidget.dev) framework.
84
-
-[typst](https://typst.app) is used to convert HTML figures to PNG, SVG or PDF.
85
-
-Some code from the `jsdom` renderer has been adapted from [altair_saver](https://github.com/altair-viz/altair_saver).
86
-
-The documentation website is generated by [Quarto](https://quarto.org).
93
+
-[Observable Plot](https://observablehq.com/@observablehq/plot?collection=@observablehq/plot), developed by [Mike Bostock](https://observablehq.com/@mbostock) and [Philippe Rivière](https://observablehq.com/@fil) among others.
94
+
- The widget is developed thanks to the [anywidget](https://anywidget.dev) framework.
95
+
-[typst](https://typst.app) is used to convert HTML figures to PNG, SVG or PDF.
96
+
- Some code from the `jsdom` renderer has been adapted from [altair_saver](https://github.com/altair-viz/altair_saver).
97
+
- The documentation website is generated by [Quarto](https://quarto.org).
Copy file name to clipboardExpand all lines: doc/getting_started.qmd
+17-9Lines changed: 17 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,24 @@ title: "Getting started"
6
6
7
7
## Installation
8
8
9
-
`pyobsplot` can be installed with `pip`:
9
+
`pyobsplot` can be installed with `uv` or `pip`:
10
+
11
+
::: {.panel-tabset}
12
+
13
+
## uv
14
+
15
+
```sh
16
+
uv add pyobsplot[typst]
17
+
```
18
+
19
+
## pip
10
20
11
21
```sh
12
22
pip install pyobsplot[typst]
13
23
```
14
24
25
+
:::
26
+
15
27
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:
16
28
17
29
```sh
@@ -27,7 +39,6 @@ To use `pyobsplot` in [jupyter lite](https://jupyter.org/try-jupyter/lab/) or [m
27
39
pip install pyobsplot
28
40
```
29
41
30
-
31
42
## Creating a plot
32
43
33
44
To use `pyobsplot`, you must import its `Plot` object with:
0 commit comments