Skip to content

Commit 760979f

Browse files
committed
Minor cleanup and typo fixes
1 parent f64754e commit 760979f

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

docs/authors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ related to climate science, and has authored a number of
3838
as an avid vim user.
3939

4040
`Riley Brady`_ is the next-biggest contributor. He helped Luke set up automatic
41-
testing, deploy this project to PyPi, and make proplot easier for new users. He is
42-
also proplot's earliest user and helped fix `a lot of the early bugs
41+
testing, deploy this project to PyPi, and improve new user experience. He is
42+
also proplot's earliest user and helped fix `lots of early bugs
4343
<https://github.com/lukelbd/proplot/issues?q=is%3Aissue+is%3Aclosed>`__.
4444

4545
.. _Luke Davis: https://github.com/lukelbd

docs/configuration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ They should almost always be changed with `~proplot.config.rc` rather than
8585
`~proplot.config.rc_proplot` to ensure that :ref:`meta-settings <ug_meta>` are
8686
synced. These settings are not found in `~matplotlib.rcParams` -- they either
8787
control proplot-managed features (e.g., a-b-c labels and geographic gridlines)
88-
or they represent existing matplotlib settings rearranged to be
89-
more clearly ordered. Here's a broad overview of the new settings:
88+
or they represent existing matplotlib settings with more clear or succinct names.
89+
Here's a broad overview of the new settings:
9090

9191
* The ``subplots`` category includes settings that control the default
9292
subplot layout and padding.
93-
* The ``basemap`` setting controls whether basemap is the default geographic plotting
94-
backend, and the ``cartopy`` category includes cartopy-specific settings.
93+
* The ``geo`` category contains settings related to geographic plotting, including the
94+
geographic backend, gridline label settings, and map bound settings.
9595
* The ``abc``, ``title``, and ``label`` categories control a-b-c labels, axes
9696
titles, and axis labels. The latter two replace ``axes.title`` and ``axes.label``.
9797
* The ``suptitle``, ``leftlabel``, ``toplabel``, ``rightlabel``, and ``bottomlabel``

docs/fonts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747
# the open source `TeX Gyre fonts <https://ctan.org/pkg/tex-gyre?lang=en>`__ and a few
4848
# additional open source sans-serif fonts. Proplot also uses the TeX Gyre fonts as the
4949
# first (i.e., default) entries for each of matplotlib's `font family lists
50-
# <https://matplotlib.org/stable/tutorials/text/text_props.html#default-font>`__`:
50+
# <https://matplotlib.org/stable/tutorials/text/text_props.html#default-font>`__:
5151
#
5252
# * The `Helvetica <https://en.wikipedia.org/wiki/Helvetica>`__ lookalike
5353
# :rcraw:`font.sans-serif` = ``'TeX Gyre Heros'``.
5454
# * The `Century <https://en.wikipedia.org/wiki/Century_type_family>`__ lookalike
5555
# :rcraw:`font.serif` = ``'TeX Gyre Schola'``.
56-
# * The `Courier <https://en.wikipedia.org/wiki/Courier_(typeface)>`__ lookalike
57-
# :rcraw:`font.monospace` = ``'TeX Gyre Cursor'``.
5856
# * The `Chancery <https://en.wikipedia.org/wiki/ITC_Zapf_Chancery>`__ lookalike
5957
# :rcraw:`font.cursive` = ``'TeX Gyre Chorus'``.
6058
# * The `Avant Garde <https://en.wikipedia.org/wiki/ITC_Avant_Garde>`__ lookalike
6159
# :rcraw:`font.fantasy` = ``'TeX Gyre Adventor'``.
60+
# * The `Courier <https://en.wikipedia.org/wiki/Courier_(typeface)>`__ lookalike
61+
# :rcraw:`font.monospace` = ``'TeX Gyre Cursor'``.
6262
#
6363
# After importing proplot, the default matplotlib font will be
6464
# `TeX Gyre Heros <https://ctan.org/pkg/tex-gyre-heros>`__, which

proplot/axes/geo.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929
_GeoAxes = Projection = object
3030

3131
try:
32-
import mpl_toolkits.basemap as mbasemap
3332
from mpl_toolkits.basemap import Basemap
3433
except ModuleNotFoundError:
35-
mbasemap = None
3634
Basemap = object
3735

3836
__all__ = ['GeoAxes']
@@ -95,10 +93,7 @@
9593
lonminorlines_kw, latminorlines_kw : optional
9694
Aliases for `lonminorlocator_kw`, `latminorlocator_kw`.
9795
lonminorlocator_kw, latminorlocator_kw : optional
98-
As with `lonlocator_kw` and `latlocator_kw` but for the "minor" gridlines.
99-
labels : bool, str, or sequence, default:
100-
Sets `lonlabels` and `latlabels` to the same value. To draw
101-
labels by default use e.g. ``pplt.rc['grid.labels'] = True``.
96+
As with `lonlocator_kw`, and `latlocator_kw` but for the "minor" gridlines.
10297
lonlabels, latlabels, labels : str, bool, or sequence, :rc:`grid.labels`
10398
Whether to add non-inline longitude and latitude gridline labels, and on
10499
which sides of the map. Use the keyword `labels` to set both at once. The
@@ -132,14 +127,14 @@
132127
%(units.pt)s
133128
dms : bool, default: :rc:`grid.dmslabels`
134129
*For cartopy axes only.*
135-
Whether the default locators and formatters should use "minutes" and "seconds" for
136-
gridline labels on small scales rather than decimal degrees. Setting this to
137-
``False`` is equivalent to ``ax.format(lonlocator='deglon', latlocator='deglon')``
130+
Whether the default locators and formatters should use "minutes" and "seconds"
131+
for gridline labels on small scales rather than decimal degrees. Setting this to
132+
``False`` is equivalent to ``ax.format(lonlocator='deglon', latlocator='deglat')``
138133
and ``ax.format(lonformatter='deglon', latformatter='deglat')``.
139134
lonformatter, latformatter : formatter-spec, optional
140135
Formatter used to style longitude and latitude gridline labels.
141-
Passed to the `~proplot.constructor.Formatter` constructor. Can
142-
be string, list of string, or `matplotlib.ticker.Formatter` instance.
136+
Passed to the `~proplot.constructor.Formatter` constructor. Can be
137+
string, list of string, or `matplotlib.ticker.Formatter` instance.
143138
144139
For basemap or cartopy < 0.18, the defaults are ``'deglon'`` and
145140
``'deglat'``, which correspond to `~proplot.ticker.SimpleFormatter`

proplot/constructor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ def Proj(
15081508
# on initialization and controls *all* features.
15091509
else:
15101510
# Parse input arguments
1511-
import mpl_toolkits.basemap as mbasemap
1511+
from mpl_toolkits.basemap import Basemap
15121512
if name in ('eqc', 'pcarree'):
15131513
name = 'cyl' # PROJ package aliases
15141514
defaults = {'fix_aspect': True, **PROJ_DEFAULTS.get(name, {})}
@@ -1542,7 +1542,7 @@ def Proj(
15421542
)
15431543
kwargs.update({'resolution': reso, 'projection': name})
15441544
try:
1545-
proj = mbasemap.Basemap(**kwargs) # will raise helpful warning
1545+
proj = Basemap(**kwargs) # will raise helpful warning
15461546
except ValueError as err:
15471547
message = str(err)
15481548
message = message.strip()

0 commit comments

Comments
 (0)