Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Adding release notes for v0.19 #1703

Merged
merged 7 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deps-run: &deps-install
command: |
conda install -n test-environment --quiet \
cython \
matplotlib \
'matplotlib>3.3' \
numpy \
owslib \
pillow \
Expand Down
3 changes: 2 additions & 1 deletion docs/source/_static/version_switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
83 changes: 83 additions & 0 deletions docs/source/whats_new.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
What's New in cartopy 0.19
==========================

:Release: 0.19.0
:Date: XXX

For a full list of included Pull Requests and closed Issues, please see the
`0.19 milestone <https://github.com/SciTools/cartopy/milestone/27>`_.

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`)

.. 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`)

* 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`)

.. 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.
(:pull:`1516`, :pull:`1517`, :pull:`1540`, :pull:`1544`, and :pull:`1547`)


What's New in cartopy 0.18
==========================

Expand Down
38 changes: 38 additions & 0 deletions examples/miscellanea/animate_surface.py
Original file line number Diff line number Diff line change
@@ -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()