GlacioHack / geoutils

Analysis of georeferenced rasters and vectors
https://geoutils.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
86 stars 19 forks source link

Padding of colorbar in `Vector.plot()` varies despite fixed `pad` in `cax.append_axes` #585

Open rhugonnet opened 4 months ago

rhugonnet commented 4 months ago

I also tried passing a {"pad": "2%"} value to the legend_kwgs that are apparently passed to colorbar, without success... The padding created by:

divider = make_axes_locatable(ax0)
cax = divider.append_axes("right", size="5%", pad="1%")

seems to generally work, except when column is used...

If we can't manage to make it work by passing an argument or defining the cax in advance, the other solution would be to re-create the colorbar after the plotting. But then we'd need to extract the vmin/vmax, other legend_kwds associated to colorbars (like we already do a bit), and it could rapidly become complex.