From 4dfc22277f27e4b0236721655e7dd82ebd1d96c2 Mon Sep 17 00:00:00 2001 From: Neil Lawrence Date: Tue, 18 May 2021 17:51:00 +0100 Subject: [PATCH] Give latent axes proper key. --- GPy/plotting/matplot_dep/visualize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GPy/plotting/matplot_dep/visualize.py b/GPy/plotting/matplot_dep/visualize.py index 26f62777..9895131b 100644 --- a/GPy/plotting/matplot_dep/visualize.py +++ b/GPy/plotting/matplot_dep/visualize.py @@ -111,11 +111,11 @@ class lvm(matplotlib_show): self.cid = latent_axes.figure.canvas.mpl_connect('axes_leave_event', self.on_leave) self.cid = latent_axes.figure.canvas.mpl_connect('axes_enter_event', self.on_enter) else: - self.cid = latent_axes[0].figure.canvas.mpl_connect('button_press_event', self.on_click) + self.cid = latent_axes['scatter'].figure.canvas.mpl_connect('button_press_event', self.on_click) if not disable_drag: - self.cid = latent_axes[0].figure.canvas.mpl_connect('motion_notify_event', self.on_move) - self.cid = latent_axes[0].figure.canvas.mpl_connect('axes_leave_event', self.on_leave) - self.cid = latent_axes[0].figure.canvas.mpl_connect('axes_enter_event', self.on_enter) + self.cid = latent_axes['scatter'].figure.canvas.mpl_connect('motion_notify_event', self.on_move) + self.cid = latent_axes['scatter'].figure.canvas.mpl_connect('axes_leave_event', self.on_leave) + self.cid = latent_axes['scatter'].figure.canvas.mpl_connect('axes_enter_event', self.on_enter) self.data_visualize = data_visualize self.model = model