mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
[latent plots] legend was always plotted
This commit is contained in:
parent
b957bb2016
commit
e73fcac521
1 changed files with 2 additions and 2 deletions
|
|
@ -188,7 +188,7 @@ def plot_magnification(self, labels=None, which_indices=None,
|
|||
_, _, Xgrid, _, _, xmin, xmax, resolution = helper_for_plot_data(self, X, plot_limits, which_indices, None, resolution)
|
||||
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)
|
||||
if (labels is not None):
|
||||
if (labels is not None) and legend:
|
||||
legend = find_best_layout_for_subplots(len(np.unique(labels)))[1]
|
||||
else:
|
||||
labels = np.ones(self.num_data)
|
||||
|
|
@ -254,7 +254,7 @@ def plot_latent(self, labels=None, which_indices=None,
|
|||
_, _, Xgrid, _, _, xmin, xmax, resolution = helper_for_plot_data(self, X, plot_limits, which_indices, None, resolution)
|
||||
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)
|
||||
if (labels is not None):
|
||||
if (labels is not None) and legend:
|
||||
legend = find_best_layout_for_subplots(len(np.unique(labels)))[1]
|
||||
else:
|
||||
labels = np.ones(self.num_data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue