Commit c9687c8a authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'akostic-NIFTy_7-patch-16577' into 'NIFTy_7'

Make the colorbars nicer and adapt their size to the 2D plots canvas

See merge request !660
parents 31318be2 55910e94
Pipeline #105714 passed with stages
in 30 minutes and 49 seconds
......@@ -415,11 +415,17 @@ def _plot2D(f, ax, **kwargs):
rgb, extent=[0, nx*dx, 0, ny*dy], origin="lower", **norm,
from mpl_toolkits.axes_grid1 import make_axes_locatable
im = ax.imshow(
f.val.T, extent=[0, nx*dx, 0, ny*dy],
vmin=kwargs.get("vmin"), vmax=kwargs.get("vmax"),
cmap=cmap, origin="lower", **norm, **aspect)
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
plt.colorbar(im, cax=cax)
elif isinstance(dom, (HPSpace, GLSpace)):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment