Skip to content

Commit fecd16f

Browse files
committed
Misc docs cleanup
1 parent 69b40a7 commit fecd16f

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

docs/colorbars_legends.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"metadata": {},
1313
"source": [
1414
"## Axes colorbars and legends\n",
15-
"ProPlot includes some *awesome* improvements to the default API for working with colorbars and legends to make your life easier."
15+
"ProPlot includes some *awesome* improvements to the matplotlib API that make working with colorbars and legends much easier."
1616
]
1717
},
1818
{
@@ -25,7 +25,7 @@
2525
"\n",
2626
"You can also use ProPlot to draw colorbars and legends on-the-fly. To plot data and draw a colorbar in one go, pass a location (e.g. ``colorbar='r'``) to methods that accept a `cmap` argument. To draw a legend or colorbar-legend in one go, pass a location (e.g. ``legend='r'`` or ``colorbar='r'``) to methods that accept a `cycle` argument. These are powered by the `~proplot.wrappers.cmap_changer` and `~proplot.wrappers.cycle_changer` wrappers.\n",
2727
"\n",
28-
"To draw an *inset* colorbar, pass an *inset* location, e.g. ``colorbar='upper right'`` or ``colorbar='ur'``, to methods that accept a `cmap` or `cycle` argument. Inset colorbars have optional rectangular backgrounds, just like inset legends."
28+
"You can also draw an *inset* colorbar by passing an *inset* location, e.g. ``colorbar='upper right'`` or ``colorbar='ur'``, to methods that accept a `cmap` or `cycle` argument. Inset colorbars have optional rectangular backgrounds, just like inset legends."
2929
]
3030
},
3131
{

docs/usage.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ We recommend importing ProPlot as follows:
3232
import proplot as plot
3333
3434
This differentiates ProPlot from the usual ``plt`` abbreviation used for the `~matplotlib.pyplot` module.
35-
Importing proplot immediately adds a bunch of new colormaps, property cyclers, color names, and fonts to matplotlib. See :ref:`Colormaps`, :ref:`Color cycles`, and :ref:`Colors and fonts` for details.
35+
Importing ProPlot immediately adds several new colormaps, property cyclers, color names, and fonts to matplotlib. See :ref:`Colormaps`, :ref:`Color cycles`, and :ref:`Colors and fonts` for details.
36+
37+
Importing ProPlot also configures your IPython environment by setting up the matplotlib backend and enabling the autoreload and autosave extensions (this feature can be disabled). See `~proplot.rctools.ipython_matplotlib`, `~proplot.rctools.ipython_autoreload`, and `~proplot.rctools.ipython_autosave` for details.
3638

3739
Figure and axes classes
3840
=======================

docs/why.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,17 @@ Outer colorbars and legends
204204
.. rubric:: Problem
205205

206206
In matplotlib, it is difficult to draw `~matplotlib.figure.Figure.colorbar`\ s and
207-
`~matplotlib.axes.Axes.legend`\ s on the outside of subplots. By default, colorbars "steal" space from their parent subplot, which can mess up subplot aspect ratios. And since colorbar widths are specified in *axes relative* coordinates, they often look "too skinny" or "too fat" after the first draw.
207+
`~matplotlib.axes.Axes.legend`\ s intended to reference more than one subplot or
208+
along the outside of subplots:
208209

209-
As with axis labels, it is even more difficult to draw `~matplotlib.figure.Figure.colorbar`\ s and `~matplotlib.figure.Figure.legend`\ s intended to reference more than one subplot:
210+
* To draw legends outside of subplots, you usually need to position the legend manually and adjust various `~matplotlib.gridspec.GridSpec` spacing properties to make *room* for the legend.
211+
* To make colorbars that span multiple subplots, you have to supply `~matplotlib.figure.Figure.colorbar` with a `cax` you drew yourself. This requires so much tinkering that most users just add identical colorbars to every single subplot!
212+
213+
Furthermore, drawing colorbars with ``fig.colorbar(..., ax=ax)`` tends to mess up subplot aspect ratios since the space allocated for the colorbar is "stolen" from the parent axes.
214+
215+
..
216+
And since colorbar widths are specified in *axes relative* coordinates, they often look "too skinny" or "too fat" after the first draw.
210217
211-
* To make colorbars that span multiple plots, you have to supply `~matplotlib.figure.Figure.colorbar` with a `cax` you drew yourself. This requires so much tinkering that most users just add identical colorbars to every single subplot!
212-
* To draw legends outside of subplots, e.g. as a reference to *more than one* subplot, you usually need to position the legend manually and adjust various `~matplotlib.gridspec.GridSpec` spacing properties.
213218

214219
..
215220
The matplotlib example for `~matplotlib.figure.Figure` legends is `not pretty <https://matplotlib.org/3.1.1/gallery/text_labels_and_annotations/figlegend_demo.html>`__.

0 commit comments

Comments
 (0)