Skip to content

Commit a0011c3

Browse files
committed
Cleanup and use cartopy 0.20 for docs
1 parent 6dc9201 commit a0011c3

File tree

6 files changed

+37
-39
lines changed

6 files changed

+37
-39
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ notifications:
88
email: false
99

1010
python:
11-
- "3.6"
11+
- "3.7"
1212

1313
before_install:
1414
- |

ci/environment.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ name: proplot-dev
55
channels:
66
- conda-forge
77
dependencies:
8-
- python>=3.6
8+
- python==3.7
99
- numpy
1010
- pandas
1111
- xarray
12-
- matplotlib==3.2.1
13-
- cartopy==0.19.0.post1
14-
- shapely==1.7.1
12+
- matplotlib==3.2.2
13+
- cartopy==0.20.2
1514
- ipykernel
1615
- pandoc
1716
- python-build

docs/api.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,24 @@ the docs during a python session.
1010

1111
Please note that proplot removes the associated documentation when functionality
1212
is deprecated (see :ref:`What's New <whats_new>`). However, proplot adheres to
13-
`semantic versioning <https://semver.org>`__, which means old code that uses deprecated
14-
functionality will 1) still work and 2) issue warnings rather than errors until the
15-
first major release (i.e. version 1.0.0).
13+
`semantic versioning <https://semver.org>`__, which means old code that uses
14+
deprecated functionality will still work and issue warnings rather than errors
15+
until the first major release (version 1.0.0).
1616

1717
.. important::
1818

1919
The color transformation functions like `to_rgba` and `scale_luminance` from
2020
proplot < 0.10.0 can now be found as methods on the new `~proplot.colors.Color`
21-
class. Please see `~proplot.colors.Color` for the relevant documentation. Note that
22-
old code that uses commands like ``pplt.to_rgba()`` and ``pplt.scale_luminance()``
23-
will still work -- but it will result in a deprecation warning.
21+
class. Note that old code that uses commands like ``pplt.to_rgba()`` and
22+
``pplt.scale_luminance()`` will still work (but result in a deprecation warning).
2423

2524
.. important::
2625

2726
The documentation for "wrapper" functions like `standardize_1d` and `cmap_changer`
28-
from proplot < 0.8.0 like can now be found under individual `~proplot.axes.PlotAxes`
29-
methods like `~proplot.axes.PlotAxes.pcolor`. Please see `~proplot.axes.PlotAxes` for
30-
the relevant documentation. Note that calling ``help(ax.method)`` in a python session
31-
will show both the proplot documentation and the original matplotlib documentation.
27+
from proplot < 0.8.0 can now be found under individual `~proplot.axes.PlotAxes`
28+
methods like `~proplot.axes.PlotAxes.plot` and `~proplot.axes.PlotAxes.pcolor`. Note
29+
that calling ``help(ax.method)`` in a python session will show both the proplot
30+
documentation and the original matplotlib documentation.
3231

3332
Figure class
3433
============

docs/environment.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# use 3.2.1. Probably lots of basemap holdouts for next ~5 years.
55
# * basemap geography is weird with the geos >= 3.9.0 required by cartopy >=
66
# 0.19, but important to use 0.19 becuase it fixes padding, so live with it.
7-
# * cartopy 0.20 makes grid labels look nicer, but it requires python 3.9.
8-
# will wait a couple years to catch up to them and keep python 3.6 for now.
97
# * pyqt5 is needed by pyplot, RTD server *happens* to already have it
108
# but creating local environment will fail.
119
# * jinja >= 3.0 and nbsphinx >= 0.8.2 seem to break default ReST roles when
@@ -16,13 +14,12 @@ name: proplot-dev
1614
channels:
1715
- conda-forge
1816
dependencies:
19-
- python>=3.6
17+
- python==3.8
2018
- numpy
2119
- pandas
2220
- xarray
23-
- matplotlib==3.2.1
24-
- cartopy==0.19.0.post1
25-
- shapely==1.7.1
21+
- matplotlib==3.2.2
22+
- cartopy==0.20.2
2623
- ipykernel
2724
- pandoc
2825
- pip

docs/why.rst

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -325,18 +325,18 @@ concise figures.
325325
commands can easily draw colorbars and legends intended to reference more than
326326
one subplot in arbitrary contiguous rows and columns. See the
327327
:ref:`next section <why_colorbars_legends>` for details.
328-
* The `~proplot.axes.Axes.panel_axes` (shorthand `~proplot.axes.Axes.panel`) commands
329-
can draw :ref:`thin panels <ug_panels>` along the edges of subplots. This
330-
can be useful for plotting 1D summary statistics alongside 2D plots.
331328
* A-b-c labels can be added to subplots simply using the :rcraw:`abc`
332329
setting -- for example, ``pplt.rc['abc'] = 'A.'`` or ``axs.format(abc='A.')``.
333330
This is possible because `~proplot.figure.Figure.add_subplot` assigns a unique
334331
`~proplot.axes.Axes.number` to every new subplot.
335332
* The `proplot.gridspec.SubplotGrid.format` command can easily format multiple subplots
336333
at once or add colorbars, legends, panels, twin axes, or inset axes to multiple
337334
subplots at once. A `~proplot.gridspec.SubplotGrid` is returned by
338-
`proplot.figure.Figure.subplots`, and can be indexed like a list or like a 2D
339-
array (in which case the indices match the subplot grid extents).
335+
`proplot.figure.Figure.subplots`, and can be indexed like a list or a 2D array.
336+
* The `~proplot.axes.Axes.panel_axes` (shorthand `~proplot.axes.Axes.panel`) commands
337+
draw :ref:`thin panels <ug_panels>` along the edges of subplots. This can be useful
338+
for plotting 1D summary statistics alongside 2D plots. You can also add twin axes and
339+
panel axes to several subplots at once using `~proplot.gridspec.SubplotGrid` commands.
340340

341341
Links
342342
-----
@@ -798,19 +798,22 @@ This may be confusing for users outside of the United States.
798798
Solution
799799
--------
800800

801-
Proplot introduces the physical units engine `~proplot.utils.units` for
802-
interpreting `figsize`, `figwidth`, `figheight`, `refwidth`, `refheight`,
803-
`left`, `right`, `top`, `bottom`, `wspace`, `hspace`, and keyword arguments in a
804-
few other places. Acceptable units include inches, centimeters, millimeters,
801+
Proplot uses physical units for the `~proplot.gridspec.GridSpec` keywords
802+
`left`, `right`, `top`, `bottom`, `wspace`, `hspace`, `pad`, `outerpad`, and
803+
`innerpad`. The default unit (assumed when a numeric argument is passed) is
804+
`em-widths <https://en.wikipedia.org/wiki/Em_(typography)>`__. Em-widths are
805+
particularly appropriate for this context, as plot text can be a useful "ruler"
806+
when figuring out the amount of space you need. Proplot also permits arbitrary
807+
string units for these keywords, for the `~proplot.figure.Figure` keywords
808+
`figsize`, `figwidth`, `figheight`, `refwidth`, and `refheight`, and in a
809+
few other places. This is powered by the physical units engine `~proplot.utils.units`.
810+
Acceptable units include inches, centimeters, millimeters,
805811
pixels, `points <https://en.wikipedia.org/wiki/Point_(typography)>`__, `picas
806-
<https://en.wikipedia.org/wiki/Pica_(typography)>`__, and `em-heights
807-
<https://en.wikipedia.org/wiki/Em_(typography)>`__ (a table of acceptable units
808-
is found :ref:`here <units_table>`). Em-heights are particularly useful, as the
809-
figure text can be a useful "ruler" when figuring out the amount of space you
810-
need. The `~proplot.utils.units` function also translates rc settings assigned
811-
to `~proplot.config.rc_matplotlib` and `~proplot.config.rc_proplot`, e.g.
812-
:rcraw:`axes.labelpad`, :rcraw:`legend.handlelength`, and
813-
:rcraw:`subplot.refwidth`.
812+
<https://en.wikipedia.org/wiki/Pica_(typography)>`__, and (a table of acceptable
813+
units is found :ref:`here <units_table>`). Note the `~proplot.utils.units` engine
814+
also translates rc settings assigned to `~proplot.config.rc_matplotlib` and
815+
`~proplot.config.rc_proplot`, e.g. :rcraw:`subplots.refwidth`,
816+
# :rcraw:`legend.columnspacing`, and :rcraw:`axes.labelpad`.
814817

815818
Links
816819
-----

proplot/constructor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ def Proj(
15251525
raise RuntimeError(
15261526
'Basemap is no longer maintained and is incompatible with '
15271527
'matplotlib >= 3.3. Please use cartopy as your geographic '
1528-
'plotting backend or downgrade to matplotlib <= 3.2.'
1528+
'plotting backend or downgrade to matplotlib < 3.3.'
15291529
)
15301530
reso = _not_none(
15311531
reso=kwargs.pop('reso', None),

0 commit comments

Comments
 (0)