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 474463902,MDU6SXNzdWU0NzQ0NjM5MDI=,3169,Plotting inconsistencies with Cartopy,358378,closed,0,,,4,2019-07-30T09:06:15Z,2022-04-18T15:49:12Z,2022-04-18T15:49:12Z,CONTRIBUTOR,,,,"I'm on xarray 0.11.3, and currently do not have the possibility to test on master. However, the commit history suggests that this issue still exists. Please accept my apologies if I missed something. I'm following the plotting documentation at https://xarray.pydata.org/en/stable/plotting.html#maps When plotting two maps in the same call (exactly as written in the documentation), p = air.isel(time=[0, 1]).plot(transform=ccrs.PlateCarree(), col='time', subplot_kws={'projection': ccrs.Orthographic(-80, 35)}) for ax in p.axes.flat: ax.coastlines() ax.gridlines() everything works fine. However, when I only want to plot one map, p = air.isel(time=[0]).plot(transform=ccrs.PlateCarree(), subplot_kws={'projection': ccrs.Orthographic(-80, 35)}) for ax in p.axes.flat: ax.coastlines() ax.gridlines() I get the following error: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in 1 p = air.isel(time=[0]).plot(transform=ccrs.PlateCarree(), ----> 2 subplot_kws={'projection': ccrs.Orthographic(-80, 35)}) 3 4 for ax in p.axes.flat: 5 ax.coastlines() /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in __call__(self, **kwargs) 550 551 def __call__(self, **kwargs): --> 552 return plot(self._da, **kwargs) 553 554 @functools.wraps(hist) /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in plot(darray, row, col, col_wrap, ax, hue, rtol, subplot_kws, **kwargs) 185 kwargs['ax'] = ax 186 --> 187 return plotfunc(darray, **kwargs) 188 189 /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in newplotfunc(darray, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, center, robust, extend, levels, infer_intervals, colors, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, **kwargs) 852 vmax=cmap_params['vmax'], 853 norm=cmap_params['norm'], --> 854 **kwargs) 855 856 # Label the plot with metadata /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in pcolormesh(x, y, z, ax, infer_intervals, **kwargs) 1106 y = _infer_interval_breaks(y, axis=0) 1107 -> 1108 primitive = ax.pcolormesh(x, y, z, **kwargs) 1109 1110 # by default, pcolormesh picks ""round"" values for bounds /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs) 1808 ""the Matplotlib list!)"" % (label_namer, func.__name__), 1809 RuntimeWarning, stacklevel=2) -> 1810 return func(ax, *args, **kwargs) 1811 1812 inner.__doc__ = _add_data_doc(inner.__doc__, /home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/matplotlib/axes/_axes.py in pcolormesh(self, alpha, norm, cmap, vmin, vmax, shading, antialiased, *args, **kwargs) 6011 if (not isinstance(t, mtransforms.Transform) and 6012 hasattr(t, '_as_mpl_transform')): -> 6013 t = t._as_mpl_transform(self.axes) 6014 6015 if t and any(t.contains_branch_seperately(self.transData)): lib/cartopy/_crs.pyx in cartopy._crs.CRS._as_mpl_transform() ValueError: Axes should be an instance of GeoAxes, got It is not clear (from the user perspective) why one should work and the other should not. Of course I can create the axes instance before using xarray's `plot` function, but it would be nicer if I wouldn't have to.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3169/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 219321876,MDU6SXNzdWUyMTkzMjE4NzY=,1352,Saving to netCDF with 0D dimension doesn't work,358378,closed,0,,,9,2017-04-04T17:16:40Z,2021-07-17T18:38:29Z,2021-07-17T18:38:15Z,CONTRIBUTOR,,,,"I'm using xarray 0.9.1. When I have an array Dimensions: (category: 1, lat: 672, lon: 720, species: 1) Coordinates: * lat (lat) float64 30.03 30.09 30.16 30.22 30.28 30.34 30.41 ... * category (category) array([['2015-08-19T14:27:50.911502000+0200', '2015-08-19T14:27:50.911502000+0200']], dtype='datetime64[ns]') Coordinates: * dim_0 (dim_0) int64 0 * dim_1 (dim_1) int64 0 1 times.to_dataset().to_netcdf('test.nc') ``` raises ``` TypeError: Cannot convert input to Timestamp ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/541/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 46750605,MDU6SXNzdWU0Njc1MDYwNQ==,265,DataArray computations should handle missing values correctly,358378,closed,0,,,3,2014-10-24T15:28:25Z,2015-03-03T07:38:29Z,2014-10-24T16:17:26Z,CONTRIBUTOR,,,,"Maybe I'm just missing something ... but shouldn't ``` xray.DataArray(np.asarray([1., np.nan]), coords=[[1, 2]], dims=[""X""]).mean() ``` return `1` instead of `nan`? Or how is calculations with missing values supposed to work? I'm running xray 0.3.0. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/265/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue