Skip to content

Commit e43db85

Browse files
committed
Why proplot
1 parent efb4475 commit e43db85

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/why.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ Function Returns Interpreted by
8787

8888

8989

90-
Nice-looking figures out of the box
91-
===================================
90+
Automatic dimensions and spacing
91+
================================
9292

9393
.. raw:: html
9494

@@ -99,7 +99,7 @@ Matplotlib plots tend to require lots of "tweaking" when you have more than one
9999
#. The subplot aspect ratio is usually more relevant than the figure aspect ratio, e.g. for map projections.
100100
#. The subplot width and height control the evident thickness of text and other content plotted inside the axes.
101101

102-
Matplotlib has a `tight layout <https://matplotlib.org/tutorials/intermediate/tight_layout_guide.html>`__ algorithm to keep you from having to "tweak" the spacing, but the algorithm cannot apply different amounts of spacing between different subplot row and column boundaries. This sometimes creates figures with unnecessary extra whitespace.
102+
Matplotlib has a `tight layout <https://matplotlib.org/tutorials/intermediate/tight_layout_guide.html>`__ algorithm to keep you from having to "tweak" the spacing, but the algorithm cannot apply different amounts of spacing between different subplot row and column boundaries. This is a silly limitation that often results in unnecessary whitespace, and can be a major problem when you want to put e.g. a legend on the outside of a subplot.
103103

104104
.. raw:: html
105105

@@ -110,14 +110,16 @@ In ProPlot, you can specify the physical dimensions of *subplots* instead of the
110110
..
111111
Several matplotlib backends require figure dimensions to be fixed. When `~proplot.subplots.Figure.draw` changes the figure dimensions, this can "surprise" the backend and cause unexpected behavior. ProPlot fixes this issue for the static inline backend and the Qt popup backend. However, this issue is unfixable the "notebook" inline backend, the "macosx" popup backend, and possibly other untested backends.
112112
113-
The tight layout algorithm is also simpler and more accurate because:
113+
ProPlot also applies a new tight layout algorithm to figures *by default*. This algorithm is simpler and more accurate because:
114114

115-
#. The new `~proplot.subplots.FlexibleGridSpec` class permits variable spacing between rows and columns.
116-
#. The `~proplot.subplots.FlexibleGridSpec` spacing parameters are specified in physical units instead of figure-relative units.
115+
#. The new `~proplot.subplots.FlexibleGridSpec` class permits variable spacing between rows and columns. It turns out this is *critical* for putting :ref:`Colorbars and legends` on the outside of subplots.
117116
#. Figures are restricted to have only *one* `~proplot.subplots.FlexibleGridSpec` per figure. This is done by requiring users to draw all of their subplots at once with `~proplot.subplots.subplots`. This requirement *considerably* simplifies the algorithm (see :pr:`50` for details).
118117

119118
See :ref:`Figure tight layout` for details.
120119

120+
..
121+
#. The `~proplot.subplots.FlexibleGridSpec` spacing parameters are specified in physical units instead of figure-relative units.
122+
121123
..
122124
The `~matplotlib.gridspec.FlexibleGridSpec` class is useful for creating figures with complex subplot geometry.
123125
..

0 commit comments

Comments
 (0)