html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/1203#issuecomment-477580493,https://api.github.com/repos/pydata/xarray/issues/1203,477580493,MDEyOklzc3VlQ29tbWVudDQ3NzU4MDQ5Mw==,33062222,2019-03-28T12:48:09Z,2019-03-28T12:48:09Z,NONE,@dcherian Thanks a lot for providing an example with another approach,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-476769164,https://api.github.com/repos/pydata/xarray/issues/1203,476769164,MDEyOklzc3VlQ29tbWVudDQ3Njc2OTE2NA==,33062222,2019-03-26T17:46:57Z,2019-03-28T12:46:14Z,NONE,"@vnoel I'm trying to plot coastline using facet. I tried to give `ax.coastline()` as a subplot_kws argument but that didn't work:
```
# ds_v_test is my Dataset containing V as variable
p = ds_v_test.sel(time=slice('2012-12-01', '2012-12-02 18:00'),\
lat= slice(-90,0)).V.squeeze().plot.pcolormesh(figsize=(16, 12), col='time', col_wrap=2, levels=16 ,\
cbar_kwargs={'label':'meridional v (m/s)'}, subplot_kws={'projection':ccrs.PlateCarree(),\
'ax':ax.coastlines()})
```
It gives me
> AttributeError: Unknown property ax
At the moment, I can get around it by using this approach:
```
for ax in p.axes.flat:
ax.coastlines()
```
> INSTALLED VERSIONS
>------------------
> commit: None
> python: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
> [GCC 7.3.0]
> python-bits: 64
> OS: Linux
> OS-release: 4.15.0-45-generic
> machine: x86_64
> processor: x86_64
> byteorder: little
> LC_ALL: None
> LANG: en_US.UTF-8
> LOCALE: en_US.UTF-8
> libhdf5: 1.10.4
> libnetcdf: 4.6.2
>
> xarray: 0.12.0
> pandas: 0.24.2
> numpy: 1.16.2
> scipy: 1.2.1
> netCDF4: 1.4.2
> pydap: None
> h5netcdf: None
> h5py: None
> Nio: 1.5.5
> zarr: None
> cftime: 1.0.3.4
> nc_time_axis: None
> PseudonetCDF: None
> rasterio: None
> cfgrib: 0.9.6.1.post1
> iris: None
> bottleneck: None
> dask: None
> distributed: None
> matplotlib: 3.0.3
> cartopy: 0.17.0
> seaborn: 0.9.0
> setuptools: 40.8.0
> pip: 19.0.3
> conda: None
> pytest: None
> IPython: 7.3.0
> sphinx: None
>
> ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-477188610,https://api.github.com/repos/pydata/xarray/issues/1203,477188610,MDEyOklzc3VlQ29tbWVudDQ3NzE4ODYxMA==,2448579,2019-03-27T14:45:00Z,2019-03-27T15:51:22Z,MEMBER,"Yes you'll have to call `ax.coastlines()` on every axis you want a coastline on. The `subplot_kws` kwarg is passed down to `plt.subplots` (see documentation here https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots.html).
You should be able to do:
``` python
g = ds_v_test.plot(...)
g.map(lambda: plt.gca().coastlines())
```
The other option would be to loop over `g.axes.flat` as in http://xarray.pydata.org/en/stable/plotting.html#maps","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-272483186,https://api.github.com/repos/pydata/xarray/issues/1203,272483186,MDEyOklzc3VlQ29tbWVudDI3MjQ4MzE4Ng==,10050469,2017-01-13T16:36:25Z,2017-01-13T16:36:25Z,MEMBER,currently github is completely down btw: https://status.github.com/,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-272482479,https://api.github.com/repos/pydata/xarray/issues/1203,272482479,MDEyOklzc3VlQ29tbWVudDI3MjQ4MjQ3OQ==,10050469,2017-01-13T16:32:49Z,2017-01-13T16:32:49Z,MEMBER,@shoyer I'll get to this later today. It should be easy to get it right before 0.9.0,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-272482044,https://api.github.com/repos/pydata/xarray/issues/1203,272482044,MDEyOklzc3VlQ29tbWVudDI3MjQ4MjA0NA==,1217238,2017-01-13T16:30:35Z,2017-01-13T16:30:35Z,MEMBER,"Merged.
@fmaussion if we can't get the doc build with cartopy working soon, we may just want to temporarily disable output from this for the v0.9.0 docs.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941
https://github.com/pydata/xarray/pull/1203#issuecomment-272296051,https://api.github.com/repos/pydata/xarray/issues/1203,272296051,MDEyOklzc3VlQ29tbWVudDI3MjI5NjA1MQ==,10050469,2017-01-12T21:55:04Z,2017-01-12T21:55:04Z,MEMBER,"Thanks @vnoel !
Unfortunately this won't render well in the docs since we don't import cartopy (yet) (the example above yours isn't really compiling so it's not importing cartopy). I'll merge this tomorrow and have a look at how to render this properly in a separate PR
On a related note, I agree that we should make a plot gallery (https://github.com/pydata/xarray/issues/1061). I've tried it out with salem and it looks nice (http://salem.readthedocs.io/en/latest/auto_examples/index.html). I'll get back to this when I'll find some time...
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200376941