Skip to content

Commit e89a2b8

Browse files
committed
Minor docs cleanup
1 parent 1dcd1b8 commit e89a2b8

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed

WHATSNEW.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ and stability is improved.
3131
Version 0.9.5 (2021-XX-XX)
3232
==========================
3333

34-
Features
35-
--------
34+
Style changes
35+
-------------
3636

3737
* Switch default :rcraw:`cmap.diverging` from ``'NegPos'`` to the more
38-
contrasty and commonly-used ``'RdBu_r'`` (:commit:`b0b8557f`).
38+
popular and contrasty colormap ``'RdBu_r'`` (:commit:`b0b8557f`).
3939
* Switch default :rcraw:`cmap.qualitative` from ``'flatui'`` to ``'colorblind10'``,
4040
consistent with the default color cycle ``'colorblind'`` (:commit:`b0b8557f`).
41-
* Apply ``positive=True``, ``negative=True``, and ``symmetric=True`` even when
42-
``discrete=False`` by modifying `vmin` and `vmax` (:commit:`fbca1063`).
43-
* Improve ``positive=True``, ``negative=True``, and ``symmetric=True`` behavior
44-
when ``discrete=True`` by modifying `vmin` and `vmax` rather than filtering
45-
level lists (:commit:`fbca1063`). This fixes issues where too few levels are made.
41+
42+
Features
43+
--------
44+
45+
* Apply ``positive=True``, ``negative=True``, and ``symmetric=True`` by modifying `vmin`
46+
and `vmax` rather than levels (:commit:`fbca1063`). This permits using these keywords
47+
even when ``discrete=False`` and fixes too-few-levels issues when ``discrete=True``.
4648
* Improve default string representation of axes generated with
4749
`~proplot.axes.CartesianAxes.altx`, `~proplot.axes.CartesianAxes.alty`,
48-
or `~proplot.axes.CartesianAxes.inset_axes` (:commit:`a570fca7`).
50+
or `~proplot.axes.Axes.inset_axes` (:commit:`a570fca7`).
4951

5052
Bug fixes
5153
---------
@@ -69,8 +71,8 @@ Bug fixes
6971
* Fix issue where `~proplot.colors.SegmentedNorm` cannot be specified with
7072
``norm='segmented'`` and ``norm_kw={'levels': level}`` when `discrete`
7173
is also disabled (:commit:`a4f6e838`).
72-
* Fix issue where more than one of mutually exclusive `sequential`, `diverging`,
73-
`cyclic`, and `qualitative` settings can be set to ``True`` and others
74+
* Fix issue where more than one of mutually-exclusive `sequential`, `diverging`,
75+
`cyclic`, and `qualitative` keywords can be set to ``True`` and others
7476
are silently ignored without warning (:commit:`f14aa263`).
7577

7678
Version 0.9.4 (2021-10-16)

docs/2dplots.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@
259259
fig = pplt.figure(refwidth=2.2, span=False, suptitle='Colormap types')
260260
axs = fig.subplots(ncols=2, nrows=2)
261261
axs.format(xformatter='none', yformatter='none')
262-
axs[0].pcolor(data, sequential=True, colorbar='l')
263-
axs[1].pcolor(data - 5, diverging=True, colorbar='r')
262+
axs[0].pcolor(data, sequential=True, colorbar='l', extend='max')
263+
axs[1].pcolor(data - 5, diverging=True, colorbar='r', extend='both')
264264
axs[2].pcolor(data % 8, cyclic=True, colorbar='l')
265265
axs[3].pcolor(data, levels=pplt.arange(0, 12, 2), qualitative=True, colorbar='r')
266266
types = ('sequential', 'diverging', 'cyclic', 'qualitative')
@@ -433,7 +433,7 @@
433433
#
434434
# #. All colormaps always span the *entire color range*,
435435
# independent of the `extend` setting.
436-
# #. Cyclic colormaps always have *discrete color levels*
436+
# #. Cyclic colormaps always have *distinct color levels*
437437
# on either end of the colorbar.
438438
#
439439
# To explicitly toggle discrete levels on or off, change :rcraw:`cmap.discrete`

docs/basics.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@
270270
# still work, ``format`` is usually more succinct -- it only needs to be called once.
271271
# You can also pass arbitrary ``format`` arguments to axes-creation commands
272272
# like `~proplot.figure.Figure.subplots`, `~proplot.figure.Figure.add_subplot`,
273-
# `~proplot.axes.Axes.inset_axes`, `~proplot.axes.Axes.panel_axes`,
274-
# and `~proplot.axes.Axes.twinx` or `~proplot.axes.Axes.twiny`. The keyword
273+
# `~proplot.axes.Axes.inset_axes`, `~proplot.axes.Axes.panel_axes`, and
274+
# `~proplot.axes.CartesianAxes.altx` or `~proplot.axes..Axes.alty`. The keyword
275275
# arguments accepted by ``format`` fall into the following groups:
276276
#
277277
# * Figure settings. These are related to row labels, column labels, and
@@ -295,10 +295,9 @@
295295
# and :ref:`this section <ug_polar>` for details.
296296
#
297297
# * Geographic axes settings (valid only for `~proplot.axes.GeoAxes`).
298-
# These are related to meridional and parallel grid lines, bounds, and labels,
299-
# along with basic geographic features -- for example,
300-
# ``ax.format(latlim=(0, 90))`` changes the meridional bounds.
301-
# See `proplot.axes.GeoAxes.format`
298+
# These are related to map bounds, meridian and parallel lines and labels,
299+
# and geographic features -- for example, ``ax.format(latlim=(0, 90))``
300+
# changes the meridional bounds. See `proplot.axes.GeoAxes.format`
302301
# and :ref:`this section <ug_geoformat>` for details.
303302
#
304303
# * `~proplot.config.rc` settings. Any keyword matching the name

docs/colors.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@
120120
# ---------------------
121121
#
122122
# If you want to draw an individual color from a colormap or a color cycle,
123-
# use ``color=(cmap, coord)`` or ``color=(cycle, index)`` with any command
124-
# that accepts the `color` keyword. The ``coord`` should be between ``0`` and
125-
# ``1``, while the ``index`` is the index on the list of cycle colors. This
126-
# feature is powered by the `~proplot.colors.ColorDatabase` class. This is
127-
# useful if you spot a nice color in one of the available colormaps or color
128-
# cycles and want to use it for some arbitrary plot element. Use the
129-
# `~proplot.utils.to_rgb` or `~proplot.utils.to_rgba` functions to retrieve
130-
# the RGB or RGBA channel values.
123+
# use ``key=(cmap, coord)`` or ``key=(cycle, index)`` with any keyword `key`
124+
# that accepts color specifications (e.g., `color`, `edgecolor`, or `facecolor`).
125+
# The ``coord`` should be a float between ``0`` and ``1``, denoting the coordinate
126+
# within a smooth colormap, while the ``index`` should be the integer index
127+
# on the discrete colormap color list. This feature is powered by the
128+
# `~proplot.colors.ColorDatabase` class. This is useful if you spot a
129+
# nice color in one of the available colormaps or color cycles and want
130+
# to use it for some arbitrary plot element. Use the `~proplot.utils.to_rgb` or
131+
# `~proplot.utils.to_rgba` functions to retrieve the RGB or RGBA channel values.
131132

132133
# %%
133134
import proplot as pplt

0 commit comments

Comments
 (0)