diff --git a/GPy/plotting/__init__.py b/GPy/plotting/__init__.py index 0bb91254..067f5580 100644 --- a/GPy/plotting/__init__.py +++ b/GPy/plotting/__init__.py @@ -52,6 +52,17 @@ def inject_plotting(): GP.plot_f = gpy_plot.gp_plots.plot_f GP.plot_magnification = gpy_plot.latent_plots.plot_magnification + from ..models import StateSpace + StateSpace.plot_data = gpy_plot.data_plots.plot_data + StateSpace.plot_data_error = gpy_plot.data_plots.plot_data_error + StateSpace.plot_errorbars_trainset = gpy_plot.data_plots.plot_errorbars_trainset + StateSpace.plot_mean = gpy_plot.gp_plots.plot_mean + StateSpace.plot_confidence = gpy_plot.gp_plots.plot_confidence + StateSpace.plot_density = gpy_plot.gp_plots.plot_density + StateSpace.plot_samples = gpy_plot.gp_plots.plot_samples + StateSpace.plot = gpy_plot.gp_plots.plot + StateSpace.plot_f = gpy_plot.gp_plots.plot_f + from ..core import SparseGP SparseGP.plot_inducing = gpy_plot.data_plots.plot_inducing diff --git a/GPy/plotting/gpy_plot/plot_util.py b/GPy/plotting/gpy_plot/plot_util.py index ec312feb..0d472d06 100644 --- a/GPy/plotting/gpy_plot/plot_util.py +++ b/GPy/plotting/gpy_plot/plot_util.py @@ -190,6 +190,7 @@ def scatter_label_generator(labels, X, visible_dims, marker=None): x = X[index, input_1] y = X[index, input_2] z = X[index, input_3] + yield x, y, z, this_label, index, m def subsample_X(X, labels, num_samples=1000): diff --git a/GPy/plotting/plotly_dep/plot_definitions.py b/GPy/plotting/plotly_dep/plot_definitions.py index eaa70f32..9e021fd8 100644 --- a/GPy/plotting/plotly_dep/plot_definitions.py +++ b/GPy/plotting/plotly_dep/plot_definitions.py @@ -131,14 +131,15 @@ class PlotlyPlots(AbstractPlottingLibrary): #not matplotlib marker pass marker_kwargs = marker_kwargs or {} - marker_kwargs.setdefault('symbol', marker) + if 'symbol' not in marker_kwargs: + marker_kwargs['symbol'] = marker if Z is not None: return Scatter3d(x=X, y=Y, z=Z, mode='markers', showlegend=label is not None, marker=Marker(color=color, colorscale=cmap, **marker_kwargs), name=label, **kwargs) return Scatter(x=X, y=Y, mode='markers', showlegend=label is not None, - marker=Marker(color=color, colorscale=cmap, **marker_kwargs or {}), + marker=Marker(color=color, colorscale=cmap, **marker_kwargs), name=label, **kwargs) def plot(self, ax, X, Y, Z=None, color=None, label=None, line_kwargs=None, **kwargs): diff --git a/GPy/testing/baseline/bayesian_gplvm_magnification.png b/GPy/testing/baseline/bayesian_gplvm_magnification.png index 1799b87c..4777e89f 100644 Binary files a/GPy/testing/baseline/bayesian_gplvm_magnification.png and b/GPy/testing/baseline/bayesian_gplvm_magnification.png differ diff --git a/GPy/testing/baseline/gplvm_magnification.png b/GPy/testing/baseline/gplvm_magnification.png index 372275a5..a271cf6c 100644 Binary files a/GPy/testing/baseline/gplvm_magnification.png and b/GPy/testing/baseline/gplvm_magnification.png differ