html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1387#issuecomment-1097920752,https://api.github.com/repos/pydata/xarray/issues/1387,1097920752,IC_kwDOAMm_X85BcPDw,26459412,2022-04-13T11:07:49Z,2022-04-13T11:07:49Z,NONE,"Any updates on this? It would be great to have an option for multiple colorbars for each axis of the `FacetGrid`, rather than the default of one single colorbar for each axis. The main use case would be when different axes span different orders of magnitude. A global `clim` hides the variability of the smaller-scale axes. @shoyer: > If your plots should have different colorbars, then arguably they should be different data variables in a Dataset. I see the reasoning here. Could the solution be an `xr.Dataset.plot.imshow` method, which optionally takes a list of `cmap`s, that automatically produces a new colorbar for each `data_var`/axis? In the meantime, manual subplot and colorbar construction with `matplotlib` works, but is annoying.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-449431078,https://api.github.com/repos/pydata/xarray/issues/1387,449431078,MDEyOklzc3VlQ29tbWVudDQ0OTQzMTA3OA==,5065341,2018-12-21T16:18:06Z,2018-12-21T16:18:06Z,NONE,"I like @shoyer 's suggestion as well. This would be very useful if the data being plotted are equal-sized images, in which case the colorbar could be dropped altogether as it no longer makes sense for them to share the same range.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-298081427,https://api.github.com/repos/pydata/xarray/issues/1387,298081427,MDEyOklzc3VlQ29tbWVudDI5ODA4MTQyNw==,1386642,2017-04-28T19:04:46Z,2017-04-28T19:04:46Z,CONTRIBUTOR,I tend to agree with you @shoyer. In that case it would be nice to have a `Dataset.plot` convenience method for plotting all the variables in a Dataset. This method could handle all the annoying boiler plate associated with subplots/AxesGrid.,"{""total_count"": 8, ""+1"": 8, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-298079713,https://api.github.com/repos/pydata/xarray/issues/1387,298079713,MDEyOklzc3VlQ29tbWVudDI5ODA3OTcxMw==,1217238,2017-04-28T18:57:04Z,2017-04-28T18:57:04Z,MEMBER,"This does kind of go against the point of FacetGrid, which is to display facets of the same variables in a grid. If your plots should have different colorbars, then arguably they should be different data variables in a Dataset. That said, this does seem similar in spirit to the `sharex` and `sharey` arguments. Maybe `sharez` or `share_vlim` would be appropriate arguments for changing this? Squeezing multiple colorbars in will be a little trickier than just allowing colorbar limits to vary, but if it can be done in a sane fashion that doesn't make the existing code more complex I would be in support.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-297997508,https://api.github.com/repos/pydata/xarray/issues/1387,297997508,MDEyOklzc3VlQ29tbWVudDI5Nzk5NzUwOA==,1386642,2017-04-28T13:27:59Z,2017-04-28T13:27:59Z,CONTRIBUTOR,"The AxesGrid API isn't actually that bad. See this ```python from mpl_toolkits.axes_grid1 import ImageGrid import xarray as xr fig = plt.figure(figsize=(6,2.5)) grid = ImageGrid(fig, 111, (1,2), axes_pad=.1, cbar_location='bottom', cbar_mode='each', cbar_pad=0.3, aspect=False, cbar_size='3%') for (lab,data), ax, cax in zip(t.groupby('season'), grid, grid.cbar_axes): im = ax.contourf(data) cax.colorbar(im) ``` ![](http://i.imgur.com/HroE4za.png)","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-297982393,https://api.github.com/repos/pydata/xarray/issues/1387,297982393,MDEyOklzc3VlQ29tbWVudDI5Nzk4MjM5Mw==,1386642,2017-04-28T12:12:56Z,2017-04-28T12:12:56Z,CONTRIBUTOR,"whoops. accidentally hit the close button. @fmaussion I was worried that would be the case. I think matplotlib's [AxesGrid](https://matplotlib.org/2.0.0/mpl_toolkits/axes_grid/index.html) module is the appropriate tool to handle this use case. Unfortunately, I find the AxesGrid API pretty unpleasant for interactive use.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826 https://github.com/pydata/xarray/issues/1387#issuecomment-297934889,https://api.github.com/repos/pydata/xarray/issues/1387,297934889,MDEyOklzc3VlQ29tbWVudDI5NzkzNDg4OQ==,10050469,2017-04-28T08:03:06Z,2017-04-28T08:03:06Z,MEMBER,"Seems reasonable, although this would imply quite a lot of change in the current logic. For example, facetgrids share x and/or y axis: ![index](https://cloud.githubusercontent.com/assets/10050469/25519732/590ef63e-2bf9-11e7-87f0-cf3a3f072c44.png) If there is a colorbar in between, would you like to share axes? The current way to do what you need is to do it manually: ``` ds = xr.tutorial.load_dataset('air_temperature') t = ds.air.groupby('time.season').mean(dim='time') f, (ax1, ax2) = plt.subplots(1, 2, figsize=(7, 3)) t.isel(season=0).plot(ax=ax1) t.isel(season=1).plot(ax=ax2) ``` ![index2](https://cloud.githubusercontent.com/assets/10050469/25519839/bc461cfa-2bf9-11e7-9736-fa6ae785fab6.png) As you see, this messes up with the layout so a call to ``tight_layout()`` is necessary. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,224846826