issues: 532165408
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
532165408 | MDU6SXNzdWU1MzIxNjU0MDg= | 3590 | cmap.set_under() does not work as expected | 3958036 | closed | 0 | 5 | 2019-12-03T18:04:07Z | 2020-02-24T20:20:07Z | 2020-02-24T20:20:07Z | CONTRIBUTOR | When using matplotlib, the dat = numpy.linspace(0, 1)[numpy.newaxis, :]*numpy.linspace(0, 1)[:, numpy.newaxis] cmap = matplotlib.cm.viridis cmap.set_under('w')pyplot.contourf(dat, vmin=.3, cmap=cmap)
pyplot.colorbar()
pyplot.show()
```
produces
while uncommenting the However, using da = DataArray(numpy.linspace(0, 1)[numpy.newaxis, :]*numpy.linspace(0, 1)[:, numpy.newaxis]) cmap = matplotlib.cm.viridis cmap.set_under('w') da.plot.contourf(vmin=.3, cmap=cmap)
pyplot.show()
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3590/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |