Skip to content

Commit eb97323

Browse files
authored
Merge pull request #158 from lukelbd/cartopy-0.18
Add support for cartopy v0.18
2 parents a93835b + 6da228c commit eb97323

File tree

10 files changed

+342
-161
lines changed

10 files changed

+342
-161
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,9 @@ ProPlot v0.7.0 (2020-##-##)
6767
ProPlot v0.6.0 (2020-##-##)
6868
===========================
6969

70-
Rather than creating branches and opening pull requests, this release was
71-
developed by running the testing suite on my local machine and making commits
72-
directly to master. I will try to avoid this sort of workflow in the future.
73-
7470
.. rubric:: Deprecated
7571

76-
There are quite a lot of deprecations for this release. Since this is
72+
There are quite a lot of deprecations for this release.
7773

7874
- Deprecate support for "parametric" plots inside `~matplotlib.axes.Axes.plot`,
7975
instead use `~proplot.axes.Axes.parametric` (:commit:`64210bce`).
@@ -114,11 +110,15 @@ There are quite a lot of deprecations for this release. Since this is
114110
`~proplot.styletools.LinearSegmentedColormap.truncated` to
115111
`~proplot.styletools.LinearSegmentedColormap.truncate`, and
116112
`~proplot.styletools.LinearSegmentedColormap.punched` to
117-
`~proplot.styletools.LinearSegmentedColormap.cut` (:pr:`e1a08930`). The old
113+
`~proplot.styletools.LinearSegmentedColormap.cut` (:commit:`e1a08930`). The old
118114
method names remain with a deprecation warning.
119115

120116
.. rubric:: Features
121117

118+
- Support `cartopy 0.18 <https://scitools.org.uk/cartopy/docs/latest/whats_new.html>`__
119+
locators, formatters, deprecations, and new labelling features (:pr:`158`).
120+
- Add :rcraw:`geogrid.labelpad` and :rcraw:`geogrid.rotatelabels` settings
121+
for cartopy gridline labels (:pr:`158`).
122122
- Support more `~proplot.ticker.AutoFormatter` features on
123123
`~proplot.ticker.SimpleFormatter` (:commit:`6decf962`).
124124
- Support drawing colorbars with descending levels (:commit:`10763146`)

docs/configuration.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Finally, the ``geoaxes``, ``land``, ``ocean``, ``rivers``, ``lakes``,
135135
the corresponding :ref:`quick settings <rc_quick>` are turned on.
136136

137137
=============================== =========================================================================================================================================================================================================================================================
138-
Key(s) Description
138+
Key Description
139139
=============================== =========================================================================================================================================================================================================================================================
140140
``abc.style`` a-b-c label style. For options, see `~proplot.axes.Axes.format`.
141141
``abc.loc`` a-b-c label position. For options, see `~proplot.axes.Axes.format`.
@@ -165,11 +165,17 @@ Key(s) Description
165165
``geoaxes.facecolor`` Face color for the map outline patch.
166166
``geoaxes.edgecolor`` Edge color for the map outline patch.
167167
``geoaxes.linewidth`` Edge width for the map outline patch.
168+
``geogrid.alpha`` Opacity of geographic gridlines.
169+
``geogrid.color`` Color of geographic gridlines.
170+
``geogrid.labelpad`` Default padding in points between map boundary edge and longitude/latitude labels.
168171
``geogrid.labels`` Boolean, indicates whether to label the parallels and meridians.
169172
``geogrid.labelsize`` Font size for latitude and longitude labels. Inherits from ``small``.
170173
``geogrid.latmax`` Absolute latitude in degrees, poleward of which meridian gridlines are cut off.
171-
``geogrid.lonstep`` Default interval for meridian gridlines in degrees.
172174
``geogrid.latstep`` Default interval for parallel gridlines in degrees.
175+
``geogrid.linestyle`` Line style for geographic gridlines.
176+
``geogrid.linewidth`` line width for geographic gridlines.
177+
``geogrid.lonstep`` Default interval for meridian gridlines in degrees.
178+
``geogrid.rotatelabels`` Whether to rotate meridian and parallel gridline labels on cartopy axes.
173179
``gridminor.linewidth`` Minor gridline width.
174180
``gridminor.linestyle`` Minor gridline style.
175181
``gridminor.alpha`` Minor gridline transparency.

docs/environment.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Hard requirements for notebook examples and documentation build
22
# Proplot itself just needs matplotlib
3+
# NOTE: Basemap is broken as of matplotlib >=3.3 so for documentation
4+
# use 3.2.1. Probably lots of basemap holdouts for next ~5 years.
35
# NOTE: PyQt5 is needed by pyplot, RTD server *happens* to already have it
46
# but creating local environment will fail.
57
name: proplot-dev
@@ -10,8 +12,8 @@ dependencies:
1012
- numpy
1113
- xarray
1214
- pandas
13-
- matplotlib
14-
- cartopy=0.17
15+
- matplotlib==3.2.1
16+
- cartopy
1517
- basemap
1618
- pandoc
1719
- ipykernel

docs/projections.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# -*- coding: utf-8 -*-
12
# ---
23
# jupyter:
34
# jupytext:
45
# text_representation:
56
# extension: .py
67
# format_name: percent
78
# format_version: '1.3'
8-
# jupytext_version: 1.3.0
9+
# jupytext_version: 1.4.2
910
# kernelspec:
1011
# display_name: Python 3
1112
# language: python
@@ -98,7 +99,7 @@
9899
# default, but you can switch to basemap using ``basemap=True``.
99100
# When you request map projections, `~proplot.ui.subplots` returns
100101
# instances of `~proplot.axes.CartopyAxes` or `~proplot.axes.BasemapAxes`.
101-
102+
#
102103
# * `~proplot.axes.CartopyAxes` joins the cartopy
103104
# `~cartopy.mpl.geoaxes.GeoAxes` class with the ProPlot
104105
# `~matplotlib.axes.Axes` class and adds a `~proplot.axes.GeoAxes.format`
@@ -163,10 +164,11 @@
163164
},
164165
ncols=2, nrows=5
165166
)
166-
axs.format(suptitle='Figure with several projections')
167-
axs.format(coast=True, latlines=30, lonlines=60)
168-
axs[:, 1].format(labels=True, lonlines=plot.arange(-180, 179, 60))
169-
axs[-1, -1].format(labels=True, lonlines=30)
167+
axs.format(
168+
suptitle='Figure with several projections',
169+
coast=True, latlines=30, lonlines=60, labels=True,
170+
)
171+
axs[-1, :].format(labels=True, lonlines=30)
170172
axs.format(collabels=['Cartopy projections', 'Basemap projections'])
171173
plot.rc.reset()
172174

0 commit comments

Comments
 (0)