issues: 117002929
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
117002929 | MDU6SXNzdWUxMTcwMDI5Mjk= | 657 | Plotting on map projection much slower on v0.6.1 than 0.6.0 | 10050469 | closed | 0 | 19 | 2015-11-15T16:39:56Z | 2016-06-15T21:10:38Z | 2016-06-15T18:17:51Z | MEMBER | The following code snippet produces an average of ERA-Interim temperature on a map: ``` python import matplotlib.pyplot as plt import xray import cartopy.crs as ccrs import time netcdf = xray.open_dataset('ERA-Int-Monthly-2mTemp.nc') t2_avg = netcdf.t2m.mean(dim='time') start_time = time.time() ax = plt.axes(projection=ccrs.Robinson()) if xray.version == '0.6.0': t2_avg.plot(ax=ax, origin='upper', aspect='equal', transform=ccrs.PlateCarree()) else: t2_avg.plot(ax=ax, transform=ccrs.PlateCarree()) ax.coastlines() plt.savefig('t_xray.png') print("xray V{}: {:.2f} s".format(xray.version, time.time() - start_time)) ``` I've been very careful to check that my environments are exact same (mpl 1.4.3, numpy 1.10.1, cartopy 0.13.0). See the output for V0.6.0 and 0.6.1 (output from the latest master is similar to 0.6.1): 0.6.0:
0.6.1:
The first warning seems related to recent numpy. Note that a second warning appeared with xray V0.6.1. It's interesting to mention that the bottleneck clearly is in the rendering ( |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/657/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |