[latent plots] legend was always plotted

This commit is contained in:
Max Zwiessele 2016-02-26 12:01:57 +00:00
parent 9c2eac6e1e
commit 3dd3b1dd6a

View file

@ -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]), 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) xlabel='latent dimension %i' % input_1, ylabel='latent dimension %i' % input_2, **imshow_kwargs)
plots = {} plots = {}
if legend: if legend and plot_scatter:
if (labels is not None): if (labels is not None):
legend = find_best_layout_for_subplots(len(np.unique(labels)))[1] legend = find_best_layout_for_subplots(len(np.unique(labels)))[1]
else: else: