From c1960b1742d3629b1df7397acd5d4314975339e5 Mon Sep 17 00:00:00 2001 From: Noe Brucy Date: Thu, 22 Jul 2021 18:10:28 +0200 Subject: [PATCH] [plotter] improve embeded --- plotter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plotter.py b/plotter.py index 09dc37d..3a7b637 100644 --- a/plotter.py +++ b/plotter.py @@ -638,17 +638,22 @@ class Plotter(Aggregator, BaseProcessor): cbaxes = inset_axes(ax, width="10%", height="100%", loc="right", borderpad=0) cbar = plt.colorbar(cax=cbaxes, orientation='vertical') cbaxes.yaxis.set_ticks_position('left') + cbaxes.yaxis.set_label_position('left') cbaxes.yaxis.set_tick_params(color="white", which="both") plt.setp(plt.getp(cbaxes.axes, 'yticklabels'), color="white") cbar.outline.set_edgecolor("white") - cbaxes.tick_params(axis="y",direction="in", pad=-25) + cbaxes.tick_params(axis="y", direction="in", pad=-25) + plt.sca(ax) else: try: cbar = plt.colorbar(im, cax=plt.gca().cax) except AttributeError: cbar = plt.colorbar() if label is not None: - cbar.set_label(label) + if embeded: + cbar.set_label(" " + label, color="white", loc="bottom") + else: + cbar.set_label(label) if put_title: title = self.snapshot_title(run, title, nml_key, put_time, unit_time)