issues: 592629388
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
592629388 | MDU6SXNzdWU1OTI2MjkzODg= | 3927 | use level of a MultiIndex for plotting? | 10194086 | closed | 0 | 1 | 2020-04-02T13:24:05Z | 2020-05-25T16:32:15Z | 2020-05-25T16:32:15Z | MEMBER | It would be nice to be able to use a level of a MultiIndex for plotting. MCVE Code Sample```python import numpy as np import xarray as xr da = xr.DataArray( np.random.randn(10), dims="x", coords=dict( a=("x", np.arange(10, 20)), b=("x", np.arange(1, 11)) ) ) da = da.set_index(x=["a", "b"])
da
Is there a way to plot a line using one of the levels of the MultiIindex?
Expected OutputA line plot VersionsOutput of `xr.show_versions()`INSTALLED VERSIONS ------------------ commit: b3bafeefbd6e6d70bce505ae1f0d9d5a2b015089 python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.15.0-91-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.5 libnetcdf: 4.7.1 xarray: 0.11.1+335.gb0c336f6 pandas: 0.25.3 numpy: 1.17.3 scipy: 1.3.1 netCDF4: 1.5.3 pydap: installed h5netcdf: 0.7.4 h5py: 2.10.0 Nio: None zarr: 2.3.2 cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: installed rasterio: 1.1.0 cfgrib: 0.9.5.4 iris: None bottleneck: 1.2.1 dask: 2.6.0 distributed: 2.6.0 matplotlib: 3.1.2 cartopy: 0.17.0 seaborn: 0.9.0 numbagg: None pint: None setuptools: 41.6.0.post20191101 pip: 19.3.1 conda: None pytest: 5.2.2 IPython: 7.9.0 sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3927/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |