plot3 0.6.2__py3-none-any.whl → 0.6.3__py3-none-any.whl

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/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.6.2"
1
+ __version__ = "0.6.3"
plot3/contour.py CHANGED
@@ -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 plot3[fast]"
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 plot3[fast]"
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(
plot3/ggplot.py CHANGED
@@ -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 ``plot3[export]`` and the Cairo C library. ``.svg``
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 ``plot3[export]`` is
687
- installed. That extra also needs the Cairo C library; ``.svg`` writes
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.
plot3/static.py CHANGED
@@ -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[export]`` extra is installed, so the three files share one
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 the Python extra with: pip install 'plot3[export]'. "
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
- 'plot3[export]'``). ``.svg`` needs nothing extra.
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 'plot3[export]' for Helvetica."
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.2
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: fast
21
- Requires-Dist: contourpy>=1.0; extra == "fast"
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 "plot3[jupyter,export]"
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 "plot3[jupyter,export]"
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
- | Extra | Adds |
288
- |---|---|
289
- | `export` | `cairosvg`: PNG with real fonts and PDF. Needs the Cairo C library (`brew install cairo`, `apt install libcairo2`). SVG needs nothing. |
290
- | `fast` | `contourpy`: faster implicit-curve contours (matplotlib users have it) |
291
- | `jupyter` | IPython integration (bare column names, `%plot3`) |
292
- | `polars` | Polars tables |
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[jupyter,export] @ git+https://github.com/rleyvasal/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,jupyter,export]"
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
@@ -1,17 +1,17 @@
1
1
  plot3/__init__.py,sha256=-jbV46XmzHZJzv7jrfi50on5Xxs1PJ8U3aV7bbSm1VA,6016
2
- plot3/__version__.py,sha256=jFlbxEJFS0G44LE-yXXVSwXACA1J_NyYDk5E20_2zpc,22
2
+ plot3/__version__.py,sha256=zYiFHqR7JwbvdK9dvKrh-RTNfUqjHUwC4CTcFAPVYLc,22
3
3
  plot3/aesexpr.py,sha256=5GbKRX0FZFpDXCDzsZzZW32MKK3uI24Y9nabNJO5RRc,10449
4
4
  plot3/build.py,sha256=cEiC9x34uplWWVCuNyAX-vpKbGiF3RIHhCyLHqqJ6EI,171107
5
5
  plot3/calculus.py,sha256=yBnZYVHKAehNIdZjYj7fWHadOTQBgSx5Ys8tNQaw11s,45442
6
6
  plot3/compose.py,sha256=BICOe1QMnI17k83YqJe8NBKs6lWnjuDox71Sv-erkM0,11513
7
- plot3/contour.py,sha256=YUrN7rtjjXR8if9L70EMJ6TswWbg9pY6-JSAqADAQEo,20401
7
+ plot3/contour.py,sha256=0EA9EJhhlqq8-cXdqHDnEKoNToNtM5NDp-hhL3z5G9I,20397
8
8
  plot3/craft.py,sha256=gZMIrLyY0BJhLNJkBUuP7hEKnkvg7_8M5jITsIFwykA,4639
9
9
  plot3/encode.py,sha256=1t1XQwbPV-vKJtTAKkJzr2Kc8umfjsuvffVxyICwcpc,2309
10
10
  plot3/expr.py,sha256=lRYeAkMIhQzhwl4uz1oX5zc5SIjJkT6L8FaA_7DuYTY,54584
11
11
  plot3/flip.py,sha256=Ox9yxjYzbEpm96raN_qupKru__hEfSMkCZxv01vGOuk,9724
12
12
  plot3/function.py,sha256=LYKLPEIdoEp_SnoNYNEXMcV3Mkoh4NyMT1FWyERhZ3c,48749
13
13
  plot3/geoms.py,sha256=HsD_opv4cM65XK_X2nMjMz59rZhUS6ajkTK24g1lVAA,90151
14
- plot3/ggplot.py,sha256=UMurC46txRc2KQgAafDm1qaiLK-vDHE6ulCUxLkyyE8,26719
14
+ plot3/ggplot.py,sha256=_QN6_sFJp2-fVbIM5yBNA4vd54Nd9yez4JU3eoCbCYg,26710
15
15
  plot3/io.py,sha256=FirkYHP4r1vaG10dmELCaa7JUwvlc1kwwKtp4zXfXHg,2649
16
16
  plot3/jupyter.py,sha256=6EgHacP3eBQ9JGM8nXCNgLosA7tTDFjR-gWij1-oaQM,17790
17
17
  plot3/latexin.py,sha256=RrXF6UClHLmsmRH8qCkFOCSgFJxrqPeyzik9t7Ce7iE,21007
@@ -23,13 +23,13 @@ plot3/scales.py,sha256=rBZbM7Z9YcJNjP7Vr3WwAukF2cDqAyGXWPx3Mo8Nko8,14197
23
23
  plot3/scaling.py,sha256=3z-m5sGh0BQcQQRIwlsX6tVaGGyMIF2DVcIEGHmY00Y,28316
24
24
  plot3/special.py,sha256=ARUav8LGcVe_cPbHoLy73O2U_2wuxUVjvoSwVYfm1-Y,12584
25
25
  plot3/stat2d.py,sha256=4a4C3HxBEOeRuMCQXHgLClxFIkPT2-Fz6DJZDev5kdg,66429
26
- plot3/static.py,sha256=erJR9Hsb_pv_WYYG7xRE-moNbMhON1ce1pu3Rajzv-E,154546
26
+ plot3/static.py,sha256=qzyXkX7AdcQJS4oUadSGuYE1_MTO14e0WuvjMx_qTgc,154532
27
27
  plot3/stats3d.py,sha256=B6WCKen7eAHSMlkeo3tnfUGcA1tpdH4OVKOl_5vkbmo,15714
28
28
  plot3/table.py,sha256=v4G6NgbEPKv6RakSHLnvfdkWNAaApEgel9be0PzPUMA,26033
29
29
  plot3/themes.py,sha256=pQnsBApRRlwQxXPrBFJVYuo6kYan8bgdT3Nlm0T9XFg,5179
30
30
  plot3/viewer.py,sha256=tKhBkO7IJpDVs2_NdM87F1O2EVtuAGst1P7bI8gtr_A,141046
31
- plot3-0.6.2.dist-info/licenses/LICENSE,sha256=OPphTrXUbMt4GNrsK8juVty13iThKFPIPnu_nh4UlAk,1081
32
- plot3-0.6.2.dist-info/METADATA,sha256=RFUINTip5JKVd8IWARh6jP0av8LFt8aSvDhq9dBqcN0,14318
33
- plot3-0.6.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
34
- plot3-0.6.2.dist-info/top_level.txt,sha256=wFHSJTzHoaJCrffpONuI8hayEblnTzRMi2y3qCcKzD0,6
35
- plot3-0.6.2.dist-info/RECORD,,
31
+ plot3-0.6.3.dist-info/licenses/LICENSE,sha256=OPphTrXUbMt4GNrsK8juVty13iThKFPIPnu_nh4UlAk,1081
32
+ plot3-0.6.3.dist-info/METADATA,sha256=1tK0cVVVKrhhXaPVu8NkceT_EBnkRm7zQnhSKVvWkvs,14007
33
+ plot3-0.6.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
34
+ plot3-0.6.3.dist-info/top_level.txt,sha256=wFHSJTzHoaJCrffpONuI8hayEblnTzRMi2y3qCcKzD0,6
35
+ plot3-0.6.3.dist-info/RECORD,,
File without changes