issues: 353623661
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 353623661 | MDU6SXNzdWUzNTM2MjM2NjE= | 2381 | Plotting norm is superseded by xarray vmin and vmax | 1186928 | closed | 0 | 6 | 2018-08-24T02:47:17Z | 2018-10-08T05:23:35Z | 2018-10-08T05:23:35Z | CONTRIBUTOR | Code Sample```python import numpy as np import xarray as xr import matplotlib.pyplot as plt import matplotlib.colors as mcolors prepare array with values between 1e0 and 1e3da = xr.DataArray(np.logspace(0, 3, 24).reshape(4, 6), dims=('x', 'y')) but we want to log-normalize between 1e0 and 1e2norm = mcolors.LogNorm(1e1, 1e2) plot with log normda.plot.imshow(norm=norm) # log norm is applied but bounds are replaced da.plot.imshow(norm=norm, vmin=norm.vmin, vmax=norm.vmax) # works, but redundantshow resultsplt.show() ``` Problem descriptionWhen passing a norm argument to imshow etc, the norm is forwarded to matplotlib but its data bounds are replaced with those calculated by xarray. Expected OutputI think that the norm's Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2381/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |