plot3 0.6.2__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plot3-0.6.2 → plot3-0.6.3}/PKG-INFO +21 -19
- {plot3-0.6.2 → plot3-0.6.3}/README.md +18 -10
- plot3-0.6.3/plot3/__version__.py +1 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/contour.py +2 -2
- {plot3-0.6.2 → plot3-0.6.3}/plot3/ggplot.py +3 -3
- {plot3-0.6.2 → plot3-0.6.3}/plot3/static.py +5 -5
- {plot3-0.6.2 → plot3-0.6.3}/plot3.egg-info/PKG-INFO +21 -19
- {plot3-0.6.2 → plot3-0.6.3}/plot3.egg-info/requires.txt +1 -10
- {plot3-0.6.2 → plot3-0.6.3}/pyproject.toml +1 -4
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_contour.py +1 -1
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_static_save.py +2 -2
- plot3-0.6.2/plot3/__version__.py +0 -1
- {plot3-0.6.2 → plot3-0.6.3}/LICENSE +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/__init__.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/aesexpr.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/build.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/calculus.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/compose.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/craft.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/encode.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/expr.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/flip.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/function.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/geoms.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/io.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/jupyter.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/latexin.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/masking.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/mathtext.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/payload.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/remote.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/scales.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/scaling.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/special.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/stat2d.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/stats3d.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/table.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/themes.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3/viewer.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3.egg-info/SOURCES.txt +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3.egg-info/dependency_links.txt +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/plot3.egg-info/top_level.txt +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/setup.cfg +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_2d_density.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_3d.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_animation.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_annotate.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_api_public.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_array_backend.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_arrow.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_build_contract.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_everyday_ggplot2.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_expr.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_facets_compose.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_geom_function.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_geoms_ds.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_ggplot2_extras2.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_ggplot2_parity.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_ggplot_extras.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_grammar.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_latex_input.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_lidar_scene.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_masking.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_math_layers.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_mathtext.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_payload.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_payload_display.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_point_cloud.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_r_oracle_parity.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_readme.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_remote_bridge.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_review_fixes.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_save_menu.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_scales_api.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_scales_themes.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_special.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_stat2d.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_stats_semantic.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_step3_geoms.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_table_backends.py +0 -0
- {plot3-0.6.2 → plot3-0.6.3}/tests/test_titles_theme.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plot3
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: ggplot2 grammar of graphics for Python: interactive WebGL figures and journal-ready PNG, SVG, and PDF
|
|
5
5
|
Author: Rigoberto Leyva Salmeron
|
|
6
6
|
License-Expression: MIT
|
|
@@ -17,18 +17,12 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: numpy>=1.24
|
|
19
19
|
Requires-Dist: pandas>=2.0
|
|
20
|
-
Provides-Extra:
|
|
21
|
-
Requires-Dist:
|
|
20
|
+
Provides-Extra: pdf
|
|
21
|
+
Requires-Dist: cairosvg>=2.7; extra == "pdf"
|
|
22
22
|
Provides-Extra: dev
|
|
23
23
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
24
24
|
Requires-Dist: polars>=1.0; extra == "dev"
|
|
25
25
|
Requires-Dist: contourpy>=1.0; extra == "dev"
|
|
26
|
-
Provides-Extra: jupyter
|
|
27
|
-
Requires-Dist: ipython>=8.0; extra == "jupyter"
|
|
28
|
-
Provides-Extra: polars
|
|
29
|
-
Requires-Dist: polars>=1.0; extra == "polars"
|
|
30
|
-
Provides-Extra: export
|
|
31
|
-
Requires-Dist: cairosvg>=2.7; extra == "export"
|
|
32
26
|
Dynamic: license-file
|
|
33
27
|
|
|
34
28
|
# plot3
|
|
@@ -57,7 +51,7 @@ in the notebook and save as journal-ready PNG, SVG, or PDF.
|
|
|
57
51
|
</table>
|
|
58
52
|
|
|
59
53
|
```bash
|
|
60
|
-
pip install
|
|
54
|
+
pip install plot3
|
|
61
55
|
```
|
|
62
56
|
|
|
63
57
|
Contents: [Plot an equation](#plot-an-equation) ·
|
|
@@ -279,27 +273,35 @@ In notebooks, bare column names work as in R: `aes(x=dose, y=response)`.
|
|
|
279
273
|
## Install
|
|
280
274
|
|
|
281
275
|
```bash
|
|
282
|
-
pip install
|
|
276
|
+
pip install plot3
|
|
283
277
|
```
|
|
284
278
|
|
|
285
279
|
Python 3.10 or newer; NumPy and pandas are the only required packages.
|
|
280
|
+
Notebooks, pandas, and Polars tables work with no extras.
|
|
286
281
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
282
|
+
For PDF, and PNG with real fonts, add cairosvg and the Cairo library. SVG
|
|
283
|
+
needs neither.
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
pip install cairosvg
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
brew install cairo
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
(`apt install libcairo2` on Debian and Ubuntu.) `pip install "plot3[pdf]"`
|
|
294
|
+
installs plot3 and cairosvg together.
|
|
293
295
|
|
|
294
296
|
The latest unreleased code installs from GitHub with
|
|
295
|
-
`pip install "plot3
|
|
297
|
+
`pip install "plot3 @ git+https://github.com/rleyvasal/plot3"`.
|
|
296
298
|
|
|
297
299
|
## Development
|
|
298
300
|
|
|
299
301
|
```bash
|
|
300
302
|
git clone https://github.com/rleyvasal/plot3 && cd plot3
|
|
301
303
|
python3 -m venv .venv && source .venv/bin/activate
|
|
302
|
-
pip install -e ".[dev
|
|
304
|
+
pip install -e ".[dev]"
|
|
303
305
|
pytest -q # includes every example in this README and docs/reference.md
|
|
304
306
|
python examples/showcase_2d.py # 2D gallery in the browser
|
|
305
307
|
python examples/showcase_3d.py # 3D gallery
|
|
@@ -24,7 +24,7 @@ in the notebook and save as journal-ready PNG, SVG, or PDF.
|
|
|
24
24
|
</table>
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
pip install
|
|
27
|
+
pip install plot3
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Contents: [Plot an equation](#plot-an-equation) ·
|
|
@@ -246,27 +246,35 @@ In notebooks, bare column names work as in R: `aes(x=dose, y=response)`.
|
|
|
246
246
|
## Install
|
|
247
247
|
|
|
248
248
|
```bash
|
|
249
|
-
pip install
|
|
249
|
+
pip install plot3
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
Python 3.10 or newer; NumPy and pandas are the only required packages.
|
|
253
|
+
Notebooks, pandas, and Polars tables work with no extras.
|
|
253
254
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
For PDF, and PNG with real fonts, add cairosvg and the Cairo library. SVG
|
|
256
|
+
needs neither.
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
pip install cairosvg
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
brew install cairo
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
(`apt install libcairo2` on Debian and Ubuntu.) `pip install "plot3[pdf]"`
|
|
267
|
+
installs plot3 and cairosvg together.
|
|
260
268
|
|
|
261
269
|
The latest unreleased code installs from GitHub with
|
|
262
|
-
`pip install "plot3
|
|
270
|
+
`pip install "plot3 @ git+https://github.com/rleyvasal/plot3"`.
|
|
263
271
|
|
|
264
272
|
## Development
|
|
265
273
|
|
|
266
274
|
```bash
|
|
267
275
|
git clone https://github.com/rleyvasal/plot3 && cd plot3
|
|
268
276
|
python3 -m venv .venv && source .venv/bin/activate
|
|
269
|
-
pip install -e ".[dev
|
|
277
|
+
pip install -e ".[dev]"
|
|
270
278
|
pytest -q # includes every example in this README and docs/reference.md
|
|
271
279
|
python examples/showcase_2d.py # 2D gallery in the browser
|
|
272
280
|
python examples/showcase_3d.py # 3D gallery
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.3"
|
|
@@ -115,7 +115,7 @@ def _backend_name() -> str:
|
|
|
115
115
|
if _load_contourpy() is None:
|
|
116
116
|
raise ValueError(
|
|
117
117
|
"PLOT3_CONTOUR_BACKEND=contourpy but contourpy>=1.0 is not "
|
|
118
|
-
"installed. Install it with: pip install
|
|
118
|
+
"installed. Install it with: pip install contourpy"
|
|
119
119
|
)
|
|
120
120
|
return "contourpy"
|
|
121
121
|
if _load_contourpy() is None:
|
|
@@ -346,7 +346,7 @@ def _contour_contourpy(
|
|
|
346
346
|
if contourpy is None:
|
|
347
347
|
raise ValueError(
|
|
348
348
|
"PLOT3_CONTOUR_BACKEND=contourpy but contourpy>=1.0 is not "
|
|
349
|
-
"installed. Install it with: pip install
|
|
349
|
+
"installed. Install it with: pip install contourpy"
|
|
350
350
|
)
|
|
351
351
|
masked = np.ma.masked_invalid(np.asarray(field, dtype=np.float64))
|
|
352
352
|
generator = contourpy.contour_generator(
|
|
@@ -517,7 +517,7 @@ class ggplot:
|
|
|
517
517
|
suffix writes the standalone HTML viewer. ``width`` and ``height``
|
|
518
518
|
are pixels unless ``units`` is ``"in"``, ``"cm"``, or ``"mm"``.
|
|
519
519
|
``dpi`` is the PNG resolution for a physical size (default 300).
|
|
520
|
-
PDF needs
|
|
520
|
+
PDF needs cairosvg and the Cairo C library. ``.svg``
|
|
521
521
|
needs neither.
|
|
522
522
|
"""
|
|
523
523
|
suffix = Path(path).suffix.lower()
|
|
@@ -683,8 +683,8 @@ def ggsave(
|
|
|
683
683
|
"""Save ``plot``.
|
|
684
684
|
|
|
685
685
|
``ggsave("fig.png", p)`` and ``ggsave("fig.svg", p)`` write a static
|
|
686
|
-
image. ``ggsave("fig.pdf", p)`` writes a PDF when
|
|
687
|
-
installed.
|
|
686
|
+
image. ``ggsave("fig.pdf", p)`` writes a PDF when cairosvg is
|
|
687
|
+
installed (``plot3[pdf]``). It also needs the Cairo C library; ``.svg`` writes
|
|
688
688
|
the same drawing with no extra dependencies. Any other suffix,
|
|
689
689
|
including ``.html``, writes the standalone viewer. The plot and the
|
|
690
690
|
filename can be passed in either order.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
PNG, SVG, and PDF replay one list of drawing commands. SVG is text.
|
|
4
4
|
PNG and PDF are that same SVG rendered by cairosvg when the optional
|
|
5
|
-
``plot3[
|
|
5
|
+
``plot3[pdf]`` extra (cairosvg) is installed, so the three files share one
|
|
6
6
|
drawing and one font. That extra needs the Cairo C library as well as
|
|
7
7
|
the Python package (``libcairo2``, or the GTK runtime on Windows).
|
|
8
8
|
Without cairosvg, PNG falls back to a zlib RGB file and a built-in
|
|
@@ -42,7 +42,7 @@ _UNIT_INCH = {
|
|
|
42
42
|
}
|
|
43
43
|
_EXPORT_HINT = (
|
|
44
44
|
"ggsave() needs the Cairo C library to write PDF with a journal font. "
|
|
45
|
-
"Install
|
|
45
|
+
"Install it with: pip install cairosvg. "
|
|
46
46
|
"Windows and minimal Linux images also need the Cairo library itself "
|
|
47
47
|
"(for example the libcairo2 package, or the GTK runtime). "
|
|
48
48
|
"ggsave('fig.svg', plot) writes the same drawing with no extra dependencies."
|
|
@@ -196,8 +196,8 @@ def save_static(
|
|
|
196
196
|
``"cm"`` and ``"mm"``) with ``dpi`` (default 300) sets a physical
|
|
197
197
|
page. Layout stays in CSS pixels (96 per inch) so type keeps its
|
|
198
198
|
size, and cairosvg rasterizes that SVG at ``dpi``. PDF and a
|
|
199
|
-
journal-font PNG need the Cairo C library (``pip install
|
|
200
|
-
|
|
199
|
+
journal-font PNG need cairosvg and the Cairo C library (``pip install
|
|
200
|
+
cairosvg``). ``.svg`` needs nothing extra.
|
|
201
201
|
"""
|
|
202
202
|
path = Path(path)
|
|
203
203
|
suffix = path.suffix.lower()
|
|
@@ -251,7 +251,7 @@ def save_static(
|
|
|
251
251
|
if fallback:
|
|
252
252
|
print(
|
|
253
253
|
"plot3: PNG used the built-in font. "
|
|
254
|
-
"pip install
|
|
254
|
+
"pip install cairosvg for Helvetica."
|
|
255
255
|
)
|
|
256
256
|
return str(path)
|
|
257
257
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plot3
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: ggplot2 grammar of graphics for Python: interactive WebGL figures and journal-ready PNG, SVG, and PDF
|
|
5
5
|
Author: Rigoberto Leyva Salmeron
|
|
6
6
|
License-Expression: MIT
|
|
@@ -17,18 +17,12 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: numpy>=1.24
|
|
19
19
|
Requires-Dist: pandas>=2.0
|
|
20
|
-
Provides-Extra:
|
|
21
|
-
Requires-Dist:
|
|
20
|
+
Provides-Extra: pdf
|
|
21
|
+
Requires-Dist: cairosvg>=2.7; extra == "pdf"
|
|
22
22
|
Provides-Extra: dev
|
|
23
23
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
24
24
|
Requires-Dist: polars>=1.0; extra == "dev"
|
|
25
25
|
Requires-Dist: contourpy>=1.0; extra == "dev"
|
|
26
|
-
Provides-Extra: jupyter
|
|
27
|
-
Requires-Dist: ipython>=8.0; extra == "jupyter"
|
|
28
|
-
Provides-Extra: polars
|
|
29
|
-
Requires-Dist: polars>=1.0; extra == "polars"
|
|
30
|
-
Provides-Extra: export
|
|
31
|
-
Requires-Dist: cairosvg>=2.7; extra == "export"
|
|
32
26
|
Dynamic: license-file
|
|
33
27
|
|
|
34
28
|
# plot3
|
|
@@ -57,7 +51,7 @@ in the notebook and save as journal-ready PNG, SVG, or PDF.
|
|
|
57
51
|
</table>
|
|
58
52
|
|
|
59
53
|
```bash
|
|
60
|
-
pip install
|
|
54
|
+
pip install plot3
|
|
61
55
|
```
|
|
62
56
|
|
|
63
57
|
Contents: [Plot an equation](#plot-an-equation) ·
|
|
@@ -279,27 +273,35 @@ In notebooks, bare column names work as in R: `aes(x=dose, y=response)`.
|
|
|
279
273
|
## Install
|
|
280
274
|
|
|
281
275
|
```bash
|
|
282
|
-
pip install
|
|
276
|
+
pip install plot3
|
|
283
277
|
```
|
|
284
278
|
|
|
285
279
|
Python 3.10 or newer; NumPy and pandas are the only required packages.
|
|
280
|
+
Notebooks, pandas, and Polars tables work with no extras.
|
|
286
281
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
282
|
+
For PDF, and PNG with real fonts, add cairosvg and the Cairo library. SVG
|
|
283
|
+
needs neither.
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
pip install cairosvg
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
brew install cairo
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
(`apt install libcairo2` on Debian and Ubuntu.) `pip install "plot3[pdf]"`
|
|
294
|
+
installs plot3 and cairosvg together.
|
|
293
295
|
|
|
294
296
|
The latest unreleased code installs from GitHub with
|
|
295
|
-
`pip install "plot3
|
|
297
|
+
`pip install "plot3 @ git+https://github.com/rleyvasal/plot3"`.
|
|
296
298
|
|
|
297
299
|
## Development
|
|
298
300
|
|
|
299
301
|
```bash
|
|
300
302
|
git clone https://github.com/rleyvasal/plot3 && cd plot3
|
|
301
303
|
python3 -m venv .venv && source .venv/bin/activate
|
|
302
|
-
pip install -e ".[dev
|
|
304
|
+
pip install -e ".[dev]"
|
|
303
305
|
pytest -q # includes every example in this README and docs/reference.md
|
|
304
306
|
python examples/showcase_2d.py # 2D gallery in the browser
|
|
305
307
|
python examples/showcase_3d.py # 3D gallery
|
|
@@ -25,11 +25,8 @@ dependencies = [
|
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
[project.optional-dependencies]
|
|
28
|
-
|
|
28
|
+
pdf = ["cairosvg>=2.7"]
|
|
29
29
|
dev = ["pytest>=7.0", "polars>=1.0", "contourpy>=1.0"]
|
|
30
|
-
jupyter = ["ipython>=8.0"]
|
|
31
|
-
polars = ["polars>=1.0"]
|
|
32
|
-
export = ["cairosvg>=2.7"]
|
|
33
30
|
|
|
34
31
|
[project.urls]
|
|
35
32
|
Homepage = "https://github.com/rleyvasal/plot3"
|
|
@@ -265,7 +265,7 @@ def test_version_floor_and_backend_selection(monkeypatch):
|
|
|
265
265
|
assert _backend_name() == "numpy"
|
|
266
266
|
monkeypatch.setenv("PLOT3_CONTOUR_BACKEND", "contourpy")
|
|
267
267
|
_reset_contour_backend()
|
|
268
|
-
with pytest.raises(ValueError, match=r"
|
|
268
|
+
with pytest.raises(ValueError, match=r"pip install contourpy"):
|
|
269
269
|
_contour_lines(np.linspace(-1, 1, 4), np.linspace(-1, 1, 4), np.zeros((4, 4)), 0.0)
|
|
270
270
|
|
|
271
271
|
fake = types.ModuleType("contourpy")
|
|
@@ -438,7 +438,7 @@ def test_inches_and_dpi_set_the_png_page(tmp_path, monkeypatch, capsys):
|
|
|
438
438
|
rgb = _read_png(path)
|
|
439
439
|
assert rgb.shape == (1200, 2100, 3)
|
|
440
440
|
assert tuple(rgb[0, 0]) == (255, 255, 255)
|
|
441
|
-
assert "
|
|
441
|
+
assert "pip install cairosvg" in capsys.readouterr().out
|
|
442
442
|
|
|
443
443
|
cm = tmp_path / "cm.png"
|
|
444
444
|
ggsave(cm, fig, width=2.54, height=2.54, units="cm", dpi=100)
|
|
@@ -466,7 +466,7 @@ def test_pdf_without_cairosvg_names_the_extra(tmp_path, monkeypatch):
|
|
|
466
466
|
from plot3 import static
|
|
467
467
|
|
|
468
468
|
monkeypatch.setattr(static, "_load_cairosvg", lambda: None)
|
|
469
|
-
with pytest.raises(RuntimeError, match=r"
|
|
469
|
+
with pytest.raises(RuntimeError, match=r"pip install cairosvg") as caught:
|
|
470
470
|
ggsave(tmp_path / "fig.pdf", _curve())
|
|
471
471
|
message = str(caught.value)
|
|
472
472
|
assert "Cairo" in message
|
plot3-0.6.2/plot3/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|