mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
[plotting] tests now compare the arrays of the figure, instead of the platform dependend png images
This commit is contained in:
parent
2f901a90e2
commit
108ae55fbc
78 changed files with 97 additions and 30 deletions
|
|
@ -112,7 +112,7 @@ def plot_latent_inducing(self,
|
|||
which_indices=None,
|
||||
legend=False,
|
||||
plot_limits=None,
|
||||
marker='^',
|
||||
marker=None,
|
||||
num_samples=1000,
|
||||
projection='2d',
|
||||
**kwargs):
|
||||
|
|
@ -124,16 +124,18 @@ def plot_latent_inducing(self,
|
|||
:param bool legend: whether to plot the legend on the figure
|
||||
:param plot_limits: the plot limits for the plot
|
||||
:type plot_limits: (xmin, xmax, ymin, ymax) or ((xmin, xmax), (ymin, ymax))
|
||||
:param str marker: markers to use - cycle if more labels then markers are given
|
||||
:param str marker: marker to use [default is custom arrow like]
|
||||
:param kwargs: the kwargs for the scatter plots
|
||||
"""
|
||||
canvas, projection, kwargs, sig_dims = _new_canvas(self, projection, kwargs, which_indices)
|
||||
|
||||
Z = self.Z.values
|
||||
labels = np.array(['inducing'] * Z.shape[0])
|
||||
kwargs['marker'] = marker
|
||||
if legend: label = 'inducing'
|
||||
else: label = None
|
||||
if marker is not None:
|
||||
kwargs['marker'] = marker
|
||||
update_not_existing_kwargs(kwargs, pl().defaults.inducing_2d) # @UndefinedVariable
|
||||
scatters = _plot_latent_scatter(canvas, Z, sig_dims, labels, num_samples=num_samples, projection=projection, **kwargs)
|
||||
from .data_plots import _plot_inducing
|
||||
scatters = _plot_inducing(self, canvas, sig_dims[:2], projection, label, num_samples=num_samples, **kwargs)
|
||||
return pl().add_to_canvas(canvas, dict(scatter=scatters), legend=legend)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue