issues: 274233261
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
274233261 | MDU6SXNzdWUyNzQyMzMyNjE= | 1717 | colorbars in facet grids | 7300413 | closed | 0 | 6 | 2017-11-15T17:06:15Z | 2018-10-25T16:06:53Z | 2018-10-25T16:06:53Z | NONE | Hello, In the 0.9.6 version, it does not appear to be possible to pass any arguments to the colorbar plotting routine. explicitly sets set_colorbar = False, which makes sense. However, if we want horizontal colorbars, or any way of adjusting the colorbar plotted (it is huge and unwieldy), it would be good if the plotting routine checks for and passes suitable arguments to https://github.com/pydata/xarray/blob/8267fdb1093bba3934a172cf71128470698279cd/xarray/plot/facetgrid.py#L256 I tried hacking something together, I can do something like the following now: ```python import xarray import matplotlib.pyplot as plt data = xarray.open_dataset('/data/ERSST/sst.mnmean.old.nc').sst data = data.loc[dict(time=slice('1999-1', '1999-4'))] data.plot.contourf(col='time', col_wrap=2, levels=12, cbar_kwargs=dict(orientation='horizontal', pad=0.1, aspect=30, shrink=0.6, ticks=[0, 10, 20 ,30])) ``` which produces: Is something like this available in the development version? If not, and it seems like a useful feature, I can create a PR. Joy |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1717/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |