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/issues/2932#issuecomment-605635427,https://api.github.com/repos/pydata/xarray/issues/2932,605635427,MDEyOklzc3VlQ29tbWVudDYwNTYzNTQyNw==,2448579,2020-03-29T13:26:42Z,2020-03-29T13:26:42Z,MEMBER,"Seems to work now? probably fixed by #3601 ![7cfd12224bfde93bb1a8192bb4e9c2a82ab6f9a5](https://user-images.githubusercontent.com/2448579/77850265-d2a66080-71c0-11ea-840e-b5a8759ce12f.png) ","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,438694589 https://github.com/pydata/xarray/issues/2932#issuecomment-504677016,https://api.github.com/repos/pydata/xarray/issues/2932,504677016,MDEyOklzc3VlQ29tbWVudDUwNDY3NzAxNg==,2448579,2019-06-22T15:54:08Z,2019-06-22T15:54:08Z,MEMBER,See #3038 ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,438694589 https://github.com/pydata/xarray/issues/2932#issuecomment-487947321,https://api.github.com/repos/pydata/xarray/issues/2932,487947321,MDEyOklzc3VlQ29tbWVudDQ4Nzk0NzMyMQ==,10194086,2019-04-30T13:15:05Z,2019-05-02T09:00:07Z,MEMBER,"For completeness I add the minimal example ``` python %matplotlib import numpy as np; import xarray as xr da = xr.tutorial.open_dataset('air_temperature').air cmap = 'RdBu_r' levels = np.arange(240,300+1,10) da.isel(time=slice(4)).plot(cmap=cmap, col='time', levels=levels, extend='both') ``` What I think happens is that the `cmap` is determined twice. First in [facetgrid.py](https://github.com/pydata/xarray/blob/master/xarray/plot/facetgrid.py#L225-L226). This returns a `matplotlib.colors.ListedColormap` with 6 colors. Then this reduced colormap is used in [plot.py](https://github.com/pydata/xarray/blob/master/xarray/plot/plot.py#L630-L631). However, now it only has 6 colors to choose from, so the `_over` and `_under` colors are the same as the first and last color. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,438694589 https://github.com/pydata/xarray/issues/2932#issuecomment-488279851,https://api.github.com/repos/pydata/xarray/issues/2932,488279851,MDEyOklzc3VlQ29tbWVudDQ4ODI3OTg1MQ==,7933853,2019-05-01T13:19:40Z,2019-05-01T13:19:40Z,NONE,"Thanks, I've implemented your suggestion as a workaround, but it fails with the following error: `NameError: name '_process_cmap_cbar_kwargs' is not defined`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,438694589 https://github.com/pydata/xarray/issues/2932#issuecomment-487963898,https://api.github.com/repos/pydata/xarray/issues/2932,487963898,MDEyOklzc3VlQ29tbWVudDQ4Nzk2Mzg5OA==,10194086,2019-04-30T14:01:14Z,2019-04-30T14:01:14Z,MEMBER,"The easiest way to fix this is probably to reset the cmap in [facetgrid.py Lines 224-227](https://github.com/pydata/xarray/blob/master/xarray/plot/facetgrid.py#L224-L227) ``` python cmap = kwargs.get('cmap', None) cmap_params, cbar_kwargs = _process_cmap_cbar_kwargs(func, kwargs, self.data.values) # reset the colormap #GH2932 cmap_params['cmap'] = cmap ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,438694589