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
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,8 +87,8 @@ Function Returns Interpreted by
87
87
88
88
89
89
90
-
Nice-looking figures out of the box
91
-
===================================
90
+
Automatic dimensions and spacing
91
+
================================
92
92
93
93
.. raw:: html
94
94
@@ -99,7 +99,7 @@ Matplotlib plots tend to require lots of "tweaking" when you have more than one
99
99
#. The subplot aspect ratio is usually more relevant than the figure aspect ratio, e.g. for map projections.
100
100
#. The subplot width and height control the evident thickness of text and other content plotted inside the axes.
101
101
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.
103
103
104
104
.. raw:: html
105
105
@@ -110,14 +110,16 @@ In ProPlot, you can specify the physical dimensions of *subplots* instead of the
110
110
..
111
111
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.
112
112
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:
114
114
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.
117
116
#. 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).
118
117
119
118
See :ref:`Figure tight layout` for details.
120
119
120
+
..
121
+
#. The `~proplot.subplots.FlexibleGridSpec` spacing parameters are specified in physical units instead of figure-relative units.
122
+
121
123
..
122
124
The `~matplotlib.gridspec.FlexibleGridSpec` class is useful for creating figures with complex subplot geometry.
0 commit comments