Skip to content

Commit

Permalink
Minor docs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Jan 30, 2022
1 parent 6ea48d5 commit 74fd33e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 20 deletions.
6 changes: 4 additions & 2 deletions WHATSNEW.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,15 @@ Bug fixes
sides ignored due to using booleans instead of ``'x'``, ``'y'`` (:commit:`2ac40715`).
* Fix cartopy >= 0.18 issue where longitude gridlines and labels 360 degrees east of
gridlines on the left edge of the map are unnecessarily removed (:commit:`bcf4fde3`).
* Fix cartopy <= 0.17 issue where longitude gridlines and labels east of dateline are
* Fix cartopy < 0.18 issue where longitude gridlines and labels east of dateline are
not drawn, and remove outdated gridliner monkey patches (:commit:`aa51512b`).
* Fix issue where tight layout algorithm can fail when labels from another subplot
span over an empty gridspec slot (:issue:`313`).
* Fix issue where tight layout algorithm fails in the presence of subplots
with overlapping or identical subplotspecs (:commit:`87f098b6`).
* Fix issue where `proplot.axes.Cartesian.format` keyword arguments cannot be
* Fix issue where super label settings (e.g. size) cannot be updated after they
are initially created (:commit:`2cd72fd3`).
* Fix issue where `proplot.axes.CartesianAxes.format` keyword arguments cannot be
passed to `~proplot.axes.Axes.panel_axes` (:commit:`1b3d0d48`).
* Fix issue where outer colorbars are drawn twice due to adding them as both
figure-wide axes and child axes (:issue:`304`).
Expand Down
24 changes: 12 additions & 12 deletions docs/colorbars_legends.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,19 +290,19 @@
# are restricted based on the axis length using `~proplot.ticker.DiscreteLocator`.
# You can easily toggle minor ticks using ``tickminor=True``.
#
# The geometry of colorbars is also better constrained in proplot. You can set
# the colorbar width in :ref:`physical units <ug_units>` using the `width` keyword
# (physical units help avoid the common issue where colorbars appear "too skinny"
# or "too fat" and preserves their appearance when the figure size changes).
# The default widths for outer and inset colorbars are controlled with
# :rcraw:`colorbar.width` and :rcraw:`colorbar.insetwidth`. Similarly, you can
# control the colorbar length with the `length` keyword. The default length
# for inset colorbars is controlled by :rcraw:`colorbar.insetlength`, and the
# outer colorbar length is always relative to the subplot grid with a default of ``1``.
# You can also specify the size of the colorbar "extensions" in physical units rather
# Similar to :ref:`axes panels <ug_panels>`, the geometry of proplot colorbars is
# specified with :ref:`physical units <ug_units>` (this helps avoid the common issue
# where colorbars appear "too skinny" or "too fat" and preserves their appearance
# when the figure size changes). You can specify the colorbar width locally using the
# `width` keyword or globally using the :rcraw:`colorbar.width` setting (for outer
# colorbars) and the :rcraw:`colorbar.insetwidth` setting (for inset colorbars).
# Similarly, you can specify the colorbar length locally with the `length` keyword or
# globally using the :rcraw:`colorbar.insetlength` setting. The outer colorbar length
# is always relative to the subplot grid and always has a default of ``1``. You
# can also specify the size of the colorbar "extensions" in physical units rather
# than relative units using the `extendsize` keyword rather than matplotlib's
# `extendfrac`. The default sizes for outer and inset colorbars are
# controlled by :rcraw:`colorbar.extend` and :rcraw:`colorbar.insetextend`.
# `extendfrac`. The default `extendsize` values are :rcraw:`colorbar.extend` (for
# outer colorbars) and :rcraw:`colorbar.insetextend` (for inset colorbars).
# See `~proplot.axes.Axes.colorbar` for details.

# %%
Expand Down
8 changes: 6 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ you can simply omit the dots. For example, to change the
fig, ax = pplt.subplots()
ax.format(titleloc=value)
.. _ug_rcmatplotlib:

Matplotlib settings
-------------------

Expand All @@ -82,7 +84,7 @@ Proplot settings

Proplot settings are natively stored in the `~proplot.config.rc_proplot` dictionary.
They should almost always be changed with `~proplot.config.rc` rather than
`~proplot.config.rc_proplot` to ensure that :ref:`meta-settings <ug_meta>` are
`~proplot.config.rc_proplot` to ensure that :ref:`meta-settings <ug_rcmeta>` are
synced. These settings are not found in `~matplotlib.rcParams` -- they either
control proplot-managed features (e.g., a-b-c labels and geographic gridlines)
or they represent existing matplotlib settings with more clear or succinct names.
Expand All @@ -109,7 +111,7 @@ Here's a broad overview of the new settings:
* The ``land``, ``ocean``, ``rivers``, ``lakes``, ``borders``, and ``innerborders``
categories control geographic content managed by `~proplot.axes.GeoAxes`.

.. _ug_meta:
.. _ug_rcmeta:

Meta-settings
-------------
Expand Down Expand Up @@ -147,6 +149,8 @@ Here's a broad overview of the "meta-settings":
* Setting :rcraw:`title.border` or :rcraw:`abc.border` to ``True`` automatically
sets :rcraw:`title.bbox` or :rcraw:`abc.bbox` to ``False``, and vice versa.

.. _ug_rctable:

Table of settings
-----------------

Expand Down
20 changes: 16 additions & 4 deletions docs/why.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,12 @@ Links

* For more on physical units,
see :ref:`this page <ug_units>`.
* For more on `~proplot.gridspec.GridSpec` spacing units,
see :ref:`this page <ug_tight>`
* For more on colorbar width units,
see :ref:`this page <ug_colorbar>`,
* For more on panel width units,
see :ref:`this page <ug_panels>`,

.. _why_rc:

Expand All @@ -840,7 +846,7 @@ Changes
In proplot, you can use the `~proplot.config.rc` object to change both native
matplotlib settings (found in `~proplot.config.rc_matplotlib`) and added proplot
settings (found in `~proplot.config.rc_proplot`). Assigned settings are always
validated, and special settings like ``meta.edgecolor``, ``meta.linewidth``, and
validated, and "meta" settings like ``meta.edgecolor``, ``meta.linewidth``, and
``font.smallsize`` can be used to update many settings all at once. Settings can
be changed with ``pplt.rc.key = value``, ``pplt.rc[key] = value``,
``pplt.rc.update(key=value)``, using `proplot.axes.Axes.format`, or using
Expand All @@ -854,8 +860,14 @@ Links

* For an introduction,
see :ref:`this page <ug_rc>`.
* For more on global settings,
* For more on changing settings,
see :ref:`this page <ug_config>`.
* For more on proplot settings,
see :ref:`this page <ug_rcproplot>`.
* For more on meta settings,
see :ref:`this page <ug_rcmeta>`.
* For a table of the new settings,
see :ref:`this page <ug_rctable>`.

.. _why_dotproplot:

Expand All @@ -866,8 +878,8 @@ Limitation
----------

Matplotlib `~matplotlib.rcParams` can be changed persistently by placing
``matplotlibrc`` files in the same directory as your python script. But it
can be difficult to design and store your own colormaps and color cycles for
:ref:`matplotlibrc <ug_mplrc>` files in the same directory as your python script.
But it can be difficult to design and store your own colormaps and color cycles for
future use. It is also difficult to get matplotlib to use custom ``.ttf`` and
``.otf`` font files, which may be desirable when you are working on
Linux servers with limited font selections.
Expand Down

0 comments on commit 74fd33e

Please sign in to comment.