Skip to content

Commit 46bb4e1

Browse files
committed
Minor docs cleanup
1 parent 3c025c8 commit 46bb4e1

3 files changed

Lines changed: 27 additions & 28 deletions

File tree

docs/basics.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -224,25 +224,24 @@
224224
# <https://matplotlib.org/stable/api/index.html>`__ for plotting stuff:
225225
# a "python-style" object-oriented interface with axes-level commands
226226
# like `matplotlib.axes.Axes.plot`, and a "MATLAB-style" interface
227-
# that tracks "current" axes and provides global
228-
# `~matplotlib.pyplot` commands like `matplotlib.pyplot.plot`.
229-
# Rather than adding commands to the `~matplotlib.pyplot` module,
227+
# with global commands like `matplotlib.pyplot.plot` that tracks "current" axes.
228+
# Rather than adding to the `~matplotlib.pyplot` namespace,
230229
# proplot uses the intermediate subclass `proplot.axes.PlotAxes`
231-
# to modify existing axes-level commands and add a few new commands.
230+
# to modify existing axes-level commands and add a few new ones.
232231
# While certain `~proplot.axes.PlotAxes` features may be accessible via
233232
# the relevant `~matplotlib.pyplot` commands, proplot only officially supports
234233
# the "python-style" object-oriented interface.
235234

236235
# `~proplot.axes.PlotAxes` does not change the usage or syntax of existing commands,
237-
# which means a shallow learning curve for the average matplotlib user. It also
238-
# tries to standardize the positional "data" arguments and optional keyword arguments
239-
# accepted by similar or analogous commands, providing a more intuitive interface
240-
# for new and old matplotlib users alike.
241-
# In the below example, we create a 4-panel figure with the familiar "1D"
242-
# plotting commands `~proplot.axes.PlotAxes.plot` and `~proplot.axes.PlotAxes.scatter`,
243-
# along with the "2D" plotting commands `~proplot.axes.PlotAxes.pcolormesh` and
244-
# `~proplot.axes.PlotAxes.contourf`. See the :ref:`1D plotting <ug_1dplots>` and
245-
# :ref:`2D plotting <ug_2dplots>` sections for details on the features added by proplot.
236+
# which means a shallow learning curve for the average matplotlib user. It also tries
237+
# to :ref:`standardize the positional arguments <ug_1dstd>` and optional keyword
238+
# arguments accepted by similar or analogous commands, providing an arguably more
239+
# intuitive interface. In the below example, we create a 4-panel figure with the
240+
# familiar "1D" plotting commands `~proplot.axes.PlotAxes.plot` and
241+
# `~proplot.axes.PlotAxes.scatter`, along with the "2D" plotting commands
242+
# `~proplot.axes.PlotAxes.pcolormesh` and `~proplot.axes.PlotAxes.contourf`.
243+
# See the :ref:`1D plotting <ug_1dplots>` and :ref:`2D plotting <ug_2dplots>`
244+
# sections for details on the features added by proplot.
246245

247246

248247
# %%
@@ -277,10 +276,10 @@
277276
# Matplotlib includes `two different interfaces
278277
# <https://matplotlib.org/stable/api/index.html>`__ for formatting stuff:
279278
# a "python-style" object-oriented interface with instance-level commands
280-
# like `matplotlib.axes.Axes.set_title`, and a "MATLAB-style" interface that
281-
# tracks "current" axes and provides global `~matplotlib.pyplot` commands like
279+
# like `matplotlib.axes.Axes.set_title`, and a "MATLAB-style" interface
280+
# that tracks current axes and provides global commands like
282281
# `matplotlib.pyplot.title`. Proplot provides the ``format`` command as a succinct
283-
# and powerful alternative to these two approaches. While the above one-liner
282+
# and powerful alternative to these interfaces. While matplotlib's one-liner
284283
# commands still work, we recommend using ``format`` -- it only needs to
285284
# be called once, and it tends to cut down on boilerplate code. You can call
286285
# ``format`` manually or pass ``format`` parameters to axes-creation commands
@@ -300,8 +299,8 @@
300299
# * Cartesian axes settings (valid only for `~proplot.axes.CartesianAxes`).
301300
# These are related to *x* and *y* axis ticks, spines, bounds, and labels --
302301
# for example, ``ax.format(xlim=(0, 5))`` changes the x axis bounds.
303-
# See `proplot.axes.CartesianAxes.format`
304-
# and :ref:`this section <ug_cartesian>` for details.
302+
# See `proplot.axes.CartesianAxes.format` and
303+
# :ref:`this section <ug_cartesian>` for details.
305304
#
306305
# * Polar axes settings (valid only for `~proplot.axes.PolarAxes`).
307306
# These are related to azimuthal and radial grid lines, bounds, and labels --

docs/colorbars_legends.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
# (e.g., ``loc='right'`` or the shorthand ``loc='r'``). If you draw multiple legends
4444
# or colorbars on one side, they are "stacked" on top of each other. Unlike using
4545
# `bbox_to_anchor`, the "outer" legend position is adjusted automatically when the
46-
# :ref:`tight layout algorithm <ug_tight>` is active for the figure.
46+
# :ref:`tight layout algorithm <ug_tight>` is active.
4747
# * Proplot adds the axes command `proplot.axes.Axes.colorbar`,
4848
# analogous to `proplot.axes.Axes.legend` and equivalent to
4949
# calling `proplot.figure.Figure.colorbar` with an `ax` keyword.
5050
# `~proplot.axes.Axes.colorbar` can draw both "outer" colorbars when you request
51-
# a side location (e.g., loc='right'`` or the shorthand ``loc='r'``) and "inset"
51+
# a side location (e.g., ``loc='right'`` or the shorthand ``loc='r'``) and "inset"
5252
# colorbars when you request an :ref:`inset location <colorbar_table>`
5353
# (e.g., ``loc='upper right'`` or the shorthand ``loc='ur'``). Inset
5454
# colorbars have optional background "frames" that can be configured
@@ -57,7 +57,7 @@
5757
# `~proplot.axes.Axes.colorbar` and `~proplot.axes.Axes.legend` also both accept
5858
# `space` and `pad` keywords. `space` controls the absolute separation of the
5959
# "outer" colorbar or legend from the parent subplot edge and `pad` controls the
60-
# :ref:`tight layout <ug_tight>` padding relative to the subplot axis and tick labels
60+
# :ref:`tight layout <ug_tight>` padding relative to the subplot's tick and axis labels
6161
# (or, for "inset" locations, the padding between the subplot edge and the inset frame).
6262
# The below example shows a variety of arrangements of "outer" and "inset"
6363
# colorbars and legends.
@@ -155,7 +155,7 @@
155155
colorbar_kw={'length': 0.8, 'label': 'colorbar label'},
156156
)
157157
ax.contour(
158-
state.rand(10, 10), cmap='Blues1', cmap_kw={'left': 0.1}, levels=9, lw=2,
158+
state.rand(10, 10), cmap='Mono', cmap_kw={'left': 0.1}, levels=9, lw=2,
159159
colorbar='r', colorbar_kw={'label': 'colorbar label', 'length': 0.7},
160160
label='contour', legend='ul', legend_kw={'label': 'legend from mappable'},
161161
)
@@ -264,7 +264,7 @@
264264
#
265265
# The basic usage of `proplot.axes.Axes.colorbar` and `proplot.figure.Figure.colorbar`
266266
# includes a few useful improvements compared to the matplotlib commands. The following
267-
# core feature is useful for labeling discrete plot elements that bear some numeric
267+
# feature is useful for labeling discrete plot elements that bear some numeric
268268
# relationship to one another:
269269

270270
# * Calling ``colorbar`` with a list of `~matplotlib.artist.Artist`\ s,
@@ -274,9 +274,9 @@
274274
# with :ref:`1D plot commands <ug_1dplots>` like `~proplot.axes.PlotAxes.plot`.
275275
# * The associated :ref:`colormap normalizer <ug_norm>` can be specified with the
276276
# `vmin`, `vmax`, `norm`, and `norm_kw` keywords. The `~proplot.colors.DiscreteNorm`
277-
# levels and default tick locations can be specified with `values`, or proplot will
278-
# infer them from the `~matplotlib.artist.Artist` labels (non-numeric labels will be
279-
# applied to the colorbar as tick labels).
277+
# levels can be specified with `values`, or proplot will infer them from the
278+
# `~matplotlib.artist.Artist` labels (non-numeric labels will be applied to
279+
# the colorbar as tick labels).
280280
#
281281
# Proplot also includes improvements for adding ticks and tick labels to colorbars.
282282
# Similar to `proplot.axes.CartesianAxes.format`, you can flexibly specify

proplot/figure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ def gridspec(self):
18531853
--------
18541854
proplot.figure.Figure.subplotgrid
18551855
proplot.gridspec.GridSpec.figure
1856-
ptoplot.gridspec.SubplotGrid.gridspec
1856+
proplot.gridspec.SubplotGrid.gridspec
18571857
"""
18581858
return self._gridspec
18591859

@@ -1873,7 +1873,7 @@ def subplotgrid(self):
18731873
See also
18741874
--------
18751875
proplot.figure.Figure.gridspec
1876-
ptoplot.gridspec.SubplotGrid.figure
1876+
proplot.gridspec.SubplotGrid.figure
18771877
"""
18781878
return pgridspec.SubplotGrid([s for _, s in sorted(self._subplot_dict.items())])
18791879

0 commit comments

Comments
 (0)