From 20c880a60d396d52feb9b8ff5abb371f2832da6a Mon Sep 17 00:00:00 2001 From: Nils Wagner Date: Wed, 1 Apr 2020 09:30:17 +0200 Subject: [PATCH] Tight layout --- sectionproperties/post/post.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sectionproperties/post/post.py b/sectionproperties/post/post.py index b5bae2be..601b9944 100644 --- a/sectionproperties/post/post.py +++ b/sectionproperties/post/post.py @@ -3,7 +3,7 @@ def setup_plot(ax, pause): - """Exectues code required to set up a matplotlib figure. + """Executes code required to set up a matplotlib figure. :param ax: Axes object on which to plot :type ax: :class:`matplotlib.axes.Axes` @@ -14,6 +14,7 @@ def setup_plot(ax, pause): if not pause: plt.ion() + plt.tight_layout() plt.show() else: plt.ioff() @@ -34,6 +35,7 @@ def finish_plot(ax, pause, title=''): ax.set_aspect('equal', anchor='C') if pause: + plt.tight_layout() plt.show() else: plt.draw()