From 5b8d094979e0e96d421cebacec2b8009795fbdd9 Mon Sep 17 00:00:00 2001 From: "Christoph.Knote" <christoph.knote@physik.uni-muenchen.de> Date: Tue, 12 Dec 2017 16:48:39 +0100 Subject: [PATCH] Removing x labels if not needed. --- boxmox/plotter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boxmox/plotter.py b/boxmox/plotter.py index 60c157f..61916b2 100644 --- a/boxmox/plotter.py +++ b/boxmox/plotter.py @@ -45,7 +45,8 @@ class ExperimentPlotter: ax.legend() - def fluxes(self, spec, fig=None, ax=None, plot_legend=True, plot_netflux=True, + def fluxes(self, spec, fig=None, ax=None, + plot_legend=True, plot_netflux=True, plot_xaxlabels=True, scale_factor=3600.0 * 1000.0, xlabel='Time in h', ylabel=r'Flux in ppbv h$^{-1}$', plabel=None, xaxis=True, yaxis=True): @@ -83,7 +84,10 @@ class ExperimentPlotter: horizontalalignment='center', verticalalignment='center') if plot_legend: - ax.legend(loc='best', fontsize="xx-small", fancybox=True, framealpha=0.5) + ax.legend(loc='lower center', fontsize="xx-small", fancybox=True, framealpha=0.5) + + if not plot_xaxlabels: + ax.tick_params(labelbottom='off') return fig -- GitLab