From 4e0947acd20b1f9bb2038ec48bc7a10c65d98578 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Mon, 2 Jan 2023 15:46:42 +0100
Subject: [PATCH] Simplify plotting of color bar.

This corrects the image generated by DepthProbe.py, and thereby resolves #387
---
 Wrap/Python/ba_plot.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Wrap/Python/ba_plot.py b/Wrap/Python/ba_plot.py
index efd8a337bfe..afc8bb56829 100644
--- a/Wrap/Python/ba_plot.py
+++ b/Wrap/Python/ba_plot.py
@@ -96,7 +96,7 @@ def translate_axis_label(label):
         'Qy [1/nm]': r'$Q_y \; $(nm$^{-1}$)',
         'Qz [1/nm]': r'$Q_z \; $(nm$^{-1}$)',
         'Q [1/nm]': r'$Q \; $(nm$^{-1}$)',
-        'Position [nm]': r'$Position \; $(nm)'
+        'Position [nm]': r'Position (nm)'
     }
     if label in label_dict.keys():
         return label_dict[label]
@@ -172,9 +172,7 @@ def plot_array(array, axes_limits=None, **kwargs):
         pad_fraction = 3
 
         divider = make_axes_locatable(ax)
-        width = axes_size.AxesY(ax, aspect=1. / aspect)
-        pad = axes_size.Fraction(pad_fraction, width)
-        cax = divider.append_axes("right", size=width, pad=pad)
+        cax = divider.append_axes("right", size="7%", pad="5%")
         cb = plt.colorbar(im, cax=cax)
         if zlabel:
             cb.set_label(zlabel, size=label_fontsize)
-- 
GitLab