Commit 54a38138 authored by Andrija Kostic's avatar Andrija Kostic
Browse files

A quick fix to make the colorbars nicer and adapt their size to the 2D plots canvas

parent 31318be2
Pipeline #105327 failed with stages
in 56 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