From 67862b7a6169069916f3b2966e092fd5db6fa568 Mon Sep 17 00:00:00 2001 From: Marco Biasini <mvbiasini@gmail.com> Date: Thu, 25 Oct 2012 08:00:07 +0200 Subject: [PATCH] allow to set legend directly --- modules/base/pymod/table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/base/pymod/table.py b/modules/base/pymod/table.py index 344f61e06..98292b1e9 100644 --- a/modules/base/pymod/table.py +++ b/modules/base/pymod/table.py @@ -1503,7 +1503,10 @@ Statistics for column %(col)s ax.set_xticklabels(x_labels, rotation = x_labels_rotation) if legend: - ax.legend(legend_data, cols) + if legend == True: + ax.legend(legend_data, cols) + else: + ax.legend(legend_data, legend) if save: plt.savefig(save) -- GitLab