From 62f1bd1130ca8957ece17d194d49def45a112230 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sun, 3 Jan 2021 10:41:16 -0700 Subject: [PATCH 1/7] DOC: Adding release notes for v0.19 Updating the whats_new page in the documentation. --- docs/source/whats_new.rst | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index ed0b8ce9d..0d3bd8367 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -1,6 +1,68 @@ What's New in cartopy 0.18 ========================== +:Release: 0.19.0 +:Date: XXX + +For a full list of included Pull Requests and closed Issues, please see the +`0.19 milestone `_. + +Features +-------- + +* Thomas Grainger restored PEP-517 support to improve installations. + (:pull:`1681`) + +* @emsterr added the ability to style bounding boxes of labels. (:pull:`1669`) + +* Adrien Berchet added the ability to cache downloaded image tiles. + (:pull:`1533`) + +* Greg Lucas changed the vector interpolations to be strictly in the + source coordinates, which removed some erroneous extrapolations. + (:pull:`1636`) + +* Giacomo Caria added an option to remove the cardinal direction labels + from the axes. (:pull:`1662`) + +* Greg Lucas added the ability to update data within a pcolormesh plot + using `set_array()` to enable animations of the fields. (:pull:`1496`) + Liam Bindle extended this capability to update the color limits + (:pull:`1655`) and Sebastian David Eastham fixed the return values when + `get_array()` was called (:pull:`1656`) + +* @htonchia and Greg Lucas fixed an issue with large cells appearing in + pcolormesh plots. (:pull:`1622`) + +* Philippe Miron added an example to demonstrate how to label specific + sides of the plot. (:pull:`1593`) + +* Greg Lucas added the option to restrict the limits of gridlines. (:pull:`1574`) + +* Kyle Penner fixed extrapolations using an alpha-channel in imshow(). + (:pull:`1582`) + +* Valentin Iovene added pkg-config instructions to help with installations on + MacOS. (:pull:`1596`) + +* Luke Davis updated the tight bbox calculations to include the gridliner labels. + (:pull:`1355`) + +* Luke Davis fixed the label padding for gridliners to use points which makes + the rendered screen image appear the same as the printed image now. + (:pull:`1556`) + +* Daryl Herzmann added the ability to make Hexbin plots. (:pull:`1542`) + +* Kyle Penner fixed image plotting when a 2D alpha array is input. (:pull:`1543`) + +* Elliott Sales de Andrade and Hugo van Kemenade removed Python 2 support. + (:pull:`1516`, :pull:`1517`, :pull:`1540`, :pull:`1544`, and :pull:`1547`) + + +What's New in cartopy 0.18 +========================== + :Release: 0.18.0 :Date: 3rd May 2020 From 2732ddb207c542cc86c5ee9fa7672e09f1491af3 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sat, 23 Jan 2021 10:23:04 -0700 Subject: [PATCH 2/7] DOC: Add animation example Added sphinx gallery animations and added in an example using set_array() with pcolormesh() to update a gridded surface. --- docs/source/conf.py | 1 + docs/source/whats_new.rst | 6 +++- examples/miscellanea/animate_surface.py | 38 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 examples/miscellanea/animate_surface.py diff --git a/docs/source/conf.py b/docs/source/conf.py index 8e37b699f..5f44d5af0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -112,6 +112,7 @@ 'backreferences_dir': '../build/backrefs', 'expected_failing_examples': expected_failing_examples, 'subsection_order': subsection_order, + 'matplotlib_animations': True, } # The language for content autogenerated by Sphinx. Refer to documentation diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index 0d3bd8367..596be4ffe 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -1,4 +1,4 @@ -What's New in cartopy 0.18 +What's New in cartopy 0.19 ========================== :Release: 0.19.0 @@ -31,6 +31,10 @@ Features (:pull:`1655`) and Sebastian David Eastham fixed the return values when `get_array()` was called (:pull:`1656`) +.. figure:: gallery/miscellanea/images/sphx_glr_animate_surface_001.gif + :target: gallery/miscellanea/animate_surface.html + :align: center + * @htonchia and Greg Lucas fixed an issue with large cells appearing in pcolormesh plots. (:pull:`1622`) diff --git a/examples/miscellanea/animate_surface.py b/examples/miscellanea/animate_surface.py new file mode 100644 index 000000000..a44a574fb --- /dev/null +++ b/examples/miscellanea/animate_surface.py @@ -0,0 +1,38 @@ +""" +Animating a gridded surface +--------------------------- + +This example demonstrates how to animate +gridded data using `pcolormesh()`. +""" +import matplotlib.pyplot as plt +from matplotlib.animation import FuncAnimation +import numpy as np +import cartopy.crs as ccrs + +fig = plt.figure(figsize=(10, 5)) +ax = plt.axes(projection=ccrs.Robinson()) +ax.set_global() +ax.coastlines() + +x = np.linspace(-80, 80) +xs, ys = np.meshgrid(2 * x + 180, x) +zs = xs + ys +vmin, vmax = np.min(zs), np.max(zs) +mesh = ax.pcolormesh(xs, ys, np.zeros_like(zs), transform=ccrs.PlateCarree(), + shading='auto', vmin=vmin, vmax=vmax) + +n = 10 + + +def update_mesh(t): + mesh.set_array(zs.ravel() * t) + + +ts = [i / n for i in range(n)] +# Go back to the start to make it a smooth repeat +ts += ts[::-1] +ani = FuncAnimation(fig, update_mesh, frames=ts, + interval=100) + +plt.show() From 9d145e103813cae0df6e4fb97a1354f086cc8e71 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sat, 23 Jan 2021 10:41:42 -0700 Subject: [PATCH 3/7] DOC: Adding a hexbin example to whats new --- docs/source/whats_new.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index 596be4ffe..07effd41a 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -58,6 +58,23 @@ Features * Daryl Herzmann added the ability to make Hexbin plots. (:pull:`1542`) + .. plot:: + :width: 400pt + + import matplotlib.pyplot as plt + import numpy as np + import cartopy.crs as ccrs + + fig = plt.figure(figsize=(10, 5)) + ax = plt.axes(projection=ccrs.Robinson()) + ax.coastlines() + + x, y = np.meshgrid(np.arange(-179, 181), np.arange(-90, 91)) + data = np.sqrt(x**2 + y**2) + ax.hexbin(x.flatten(), y.flatten(), C=data.flatten(), + gridsize=20, transform=ccrs.PlateCarree()) + plt.show() + * Kyle Penner fixed image plotting when a 2D alpha array is input. (:pull:`1543`) * Elliott Sales de Andrade and Hugo van Kemenade removed Python 2 support. From 16c777a9733e48047511747ce1f52dcb342dbd61 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sun, 11 Apr 2021 08:23:25 -0600 Subject: [PATCH 4/7] DOC: Updating versions in the version switcher --- docs/source/_static/version_switch.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/_static/version_switch.js b/docs/source/_static/version_switch.js index 5cc32344b..b4278b6b3 100644 --- a/docs/source/_static/version_switch.js +++ b/docs/source/_static/version_switch.js @@ -5,7 +5,8 @@ 'use strict'; var all_versions = { - 'latest': '0.18', + 'latest': '0.19', + 'v0.18': '0.18', 'v0.17': '0.17', 'v0.16': '0.16', 'v0.15': '0.15', From d2b61faf220af86585ed9da756a27a8379a569a0 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sun, 11 Apr 2021 18:10:11 -0600 Subject: [PATCH 5/7] DOC: Use MPL 3.3 or higher for doc builds --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f7cfe355..8dbc8e6a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ deps-run: &deps-install command: | conda install -n test-environment --quiet \ cython \ - matplotlib \ + 'matplotlib>3.3' \ numpy \ owslib \ pillow \ From dbecff2b584abc5c0fbbade7e30313ab10fb6686 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Wed, 21 Apr 2021 07:26:43 -0600 Subject: [PATCH 6/7] DOC: Removing failing WMTS examples from doc build --- docs/source/conf.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 5f44d5af0..33c9b03bc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -82,16 +82,16 @@ release = cartopy.__version__ -if (hasattr(owslib, '__version__') and - LooseVersion(owslib.__version__) >= '0.19.2'): - expected_failing_examples = [] -else: - # OWSLib WMTS support is broken. - expected_failing_examples = [ - '../../examples/web_services/reprojected_wmts.py', - '../../examples/web_services/wmts.py', - '../../examples/web_services/wmts_time.py', - ] +# if (hasattr(owslib, '__version__') and +# LooseVersion(owslib.__version__) >= '0.19.2'): +# expected_failing_examples = [] +# else: +# OWSLib WMTS support is broken. +expected_failing_examples = [ + '../../examples/web_services/reprojected_wmts.py', + '../../examples/web_services/wmts.py', + '../../examples/web_services/wmts_time.py', +] subsection_order = ExplicitOrder(['../../examples/lines_and_polygons', '../../examples/scalar_data', From 7c26b6b5909603f4f46c005f827d422b6f0d5a7f Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Thu, 15 Apr 2021 18:53:43 -0600 Subject: [PATCH 7/7] DOC: Updating the release date for 0.19.0 --- docs/source/whats_new.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index 07effd41a..b1aa8c475 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -2,7 +2,7 @@ What's New in cartopy 0.19 ========================== :Release: 0.19.0 -:Date: XXX +:Date: 21st Apr 2021 For a full list of included Pull Requests and closed Issues, please see the `0.19 milestone `_.