From ac42d2c73a3ed2c20fb46fa34df078d50ee1ae83 Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Wed, 21 Feb 2018 16:03:07 +0100
Subject: [PATCH] Labels and layout fix in Python example

---
 .../simulation/ex05_BeamAndDetector/RectangularDetector.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Examples/python/simulation/ex05_BeamAndDetector/RectangularDetector.py b/Examples/python/simulation/ex05_BeamAndDetector/RectangularDetector.py
index 431e13e7817..975f29e103e 100644
--- a/Examples/python/simulation/ex05_BeamAndDetector/RectangularDetector.py
+++ b/Examples/python/simulation/ex05_BeamAndDetector/RectangularDetector.py
@@ -86,12 +86,12 @@ def plot(results):
     plt.subplot(1, 3, 1)
     ba.plot_colormap(results['spherical'], title="Spherical detector",
                      xlabel=r'$\phi_f ^{\circ}$', ylabel=r'$\alpha_f ^{\circ}$',
-                     zlabel=None)
+                     zlabel="")
 
     # showing  result of rectangular detector simulation
     plt.subplot(1, 3, 2)
     ba.plot_colormap(results['rectangular'], title="Rectangular detector",
-                     xlabel='X, mm', ylabel='Y, mm', zlabel=None)
+                     xlabel='X, mm', ylabel='Y, mm', zlabel="")
 
     # show relative difference between two plots (sph[i]-rect[i])/rect[i]
     # for every detector pixel
@@ -105,7 +105,8 @@ def plot(results):
     plt.ylabel('Y, bins', fontsize=14)
     plt.title("Relative difference")
 
-    plt.subplots_adjust(left=0.05, right=0.95, top=0.88, bottom=0.12)
+    plt.subplots_adjust(left=0.05, right=0.92, top=0.88, bottom=0.12)
+    plt.tight_layout()
     plt.show()
 
 
-- 
GitLab