issues: 522457033
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 522457033 | MDU6SXNzdWU1MjI0NTcwMzM= | 3524 | xr.plot infers sequential colormap on diverging levels | 10194086 | closed | 0 | 2 | 2019-11-13T20:32:46Z | 2020-04-05T13:41:25Z | 2020-04-05T13:41:25Z | MEMBER | MCVE Code Sample```python import numpy as np import xarray as xr data = np.random.randn(10, 10) data = np.abs(data) da = xr.DataArray(data) returns a diverging colormapda.plot(vmax=2, center=0, extend="both") returns a sequential colormapda.plot(levels=[-2, -1, 0, 1, 2], extend="both") ```
Expected OutputA diverging colormap, maybe? Problem DescriptionI was surprised by getting the viridis colormap until I realised that my data must all be positive and the colormap is infered from the data and not from levels. However, when specifying the range via Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3524/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |
