issues: 636200235
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
636200235 | MDU6SXNzdWU2MzYyMDAyMzU= | 4137 | set_boundary removes data from axis on faceting plots | 3332539 | open | 0 | 6 | 2020-06-10T12:20:29Z | 2022-04-18T21:43:56Z | NONE | I experienced that when using FacetGrid plots and if I want to apply a boundary to the axes, the data from the plots get removed. A short example to illustrate this: ```python import xarray as xr import matplotlib.path as mpath import cartopy.crs as ccrs import cartopy.feature as cfeature import numpy as np ds = xr.tutorial.load_dataset('air_temperature') data = ds.air.isel(time=range(0,2)) p = data.plot(transform=ccrs.PlateCarree(), y="lat", x="lon", col='time', col_wrap=2, subplot_kws={'projection': ccrs.NorthPolarStereo()} ) theta = np.linspace(0, 2*np.pi, 100) center, radius = [0.5, 0.5], 0.5 verts = np.vstack([np.sin(theta), np.cos(theta)]).T circle = mpath.Path(verts * radius + center) for ax in p.axes.flat: ax.coastlines() ax.gridlines() ax.set_extent([-180,180, 50,90], crs=ccrs.PlateCarree()) #ax.set_boundary(circle, transform=ax.transAxes) ``` With the last line I want to have a circle as a boundary of each axis. This works but the data are not shown anymore:
Commenting the last line in the example shows the data as expected but without the boundary of course:
Any hints on why this isn't working? Cheers, Markus |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4137/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |