From 3dd3b1dd6ad54db32416b551594cc66041989b02 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 26 Feb 2016 12:01:57 +0000 Subject: [PATCH] [latent plots] legend was always plotted --- GPy/plotting/gpy_plot/latent_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/plotting/gpy_plot/latent_plots.py b/GPy/plotting/gpy_plot/latent_plots.py index df5e239a..ef8f3072 100644 --- a/GPy/plotting/gpy_plot/latent_plots.py +++ b/GPy/plotting/gpy_plot/latent_plots.py @@ -190,7 +190,7 @@ def plot_magnification(self, labels=None, which_indices=None, canvas, imshow_kwargs = pl().new_canvas(xlim=(xmin[0], xmax[0]), ylim=(xmin[1], xmax[1]), xlabel='latent dimension %i' % input_1, ylabel='latent dimension %i' % input_2, **imshow_kwargs) plots = {} - if legend: + if legend and plot_scatter: if (labels is not None): legend = find_best_layout_for_subplots(len(np.unique(labels)))[1] else: