issues: 187200802
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 187200802 | MDU6SXNzdWUxODcyMDA4MDI= | 1078 | Fascinating bug in contourf | 10050469 | closed | 0 | 3 | 2016-11-03T21:54:19Z | 2016-11-03T22:15:46Z | 2016-11-03T22:10:10Z | MEMBER | Can someone reproduce this or is it just me? ```python import matplotlib.pyplot as plt import numpy as np import xarray as xr import cartopy.crs as ccrs nlats, nlons = (241, 480) lats = np.linspace(90, -90, nlats, dtype=np.float32) lons = np.linspace(-180, 180-0.75, nlons, dtype=np.float32) l1, l2 = np.meshgrid(lons, lats) data = xr.DataArray(l1 + l2, [('latitude', lats), ('longitude', lons)]) f = plt.figure() ax1 = plt.subplot(2, 1, 1, projection=ccrs.Robinson()) data.plot.contourf(ax=ax1, transform=ccrs.PlateCarree()); ax1.coastlines(color='grey'); ax1.gridlines(); data += 180 # this is the line causing the problem ax2 = plt.subplot(2, 1, 2, projection=ccrs.Robinson()) data.plot.contourf(ax=ax2, transform=ccrs.PlateCarree()); ax2.coastlines(color='grey'); ax2.gridlines(); plt.show()
```
Gives:
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/1078/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |
