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: docs/why.rst
+1-36Lines changed: 1 addition & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ No more boilerplate
21
21
22
22
Power users often need to change lots of plot settings all at once. In matplotlib, this requires a bunch of one-liner setters and getters, like `~matplotlib.axes.Axes.set_title`.
23
23
24
-
This workflow is cumbersome, verbose, and often confusing. It can be unclear whether settings can be changed from a `~matplotlib.figure.Figure` setter, an `~matplotlib.axes.Axes` setter, an `~matplotlib.axis.XAxis` or `~matplotlib.axis.YAxis` setter, or a miscellaneous bulk function like `~matplotlib.axes.Axes.tick_params`.
24
+
This workflow is verbose and often confusing. It can be unclear whether settings can be changed from a `~matplotlib.figure.Figure` setter, an `~matplotlib.axes.Axes` setter, an `~matplotlib.axis.XAxis` or `~matplotlib.axis.YAxis` setter, or a miscellaneous bulk function like `~matplotlib.axes.Axes.tick_params`.
25
25
26
26
.. raw:: html
27
27
@@ -354,38 +354,3 @@ In ProPlot, all colormap visualizations are automatically discretized with the `
354
354
355
355
`~proplot.styletools.BinNorm` can also apply an arbitrary continuous normalizer, e.g. `~matplotlib.colors.LogNorm`, before discretization. Think of it as a "meta-normalizer" -- other normalizers perform the continuous transformation step, while this performs the discretization step.
356
356
357
-
Arbitrary physical units
358
-
========================
359
-
360
-
..
361
-
* Configuring spaces and dimensions in matplotlib often requires physical units.
362
-
363
-
.. raw:: html
364
-
365
-
<h3>Problem</h3>
366
-
367
-
Matplotlib uses "inches" for figure dimensions and figure-relative or axes-relative units almost everywhere else. The problem is:
368
-
369
-
* Inches are foreign to the world outside of the U.S.
370
-
* Figure-relative and axes-relative units encourage "tinkering" with meaningless numbers that change the subjective appearance when the physical dimensions change, since *text* and *lines* are specified in the physical units "points".
371
-
372
-
.. raw:: html
373
-
374
-
<h3>Solution</h3>
375
-
376
-
ProPlot permits arbitrary physical units for almost all sizing arguments, e.g. ``left='0.5cm'``. This is done by passing various keyword arguments through the `~proplot.utils.units` engine.
377
-
378
-
* This prevents "tinkering" and encourages users to be aware of the physical dimensions describing their figure.
379
-
* You can also use font-relative units, e.g. ``left='1em'``. This is nice when you don't care about physical dimensions, but need something more intuitive than figure-relative units.
380
-
381
-
..
382
-
* You can still use axes-relative and figure-relative units for most arguments with e.g. ``left='0.1fig'`` or ``left='0.1ax'``.
383
-
384
-
...and much more!
385
-
=================
386
-
387
-
This page is not comprehensive -- it just
388
-
illustrates how ProPlot addresses
389
-
some of the stickiest matplotlib limitations
390
-
that bug your average power user.
391
-
See :ref:`Quick overview` and the User Guide for a more comprehensive overview.
0 commit comments