def plot_latent_scatter(self, labels=None,<EOL>which_indices=None,<EOL>legend=True,<EOL>plot_limits=None,<EOL>marker='<STR_LIT>',<EOL>num_samples=<NUM_LIT:1000>,<EOL>projection='<STR_LIT>',<EOL>**kwargs):
canvas, projection, kwargs, sig_dims = _new_canvas(self, projection, kwargs, which_indices)<EOL>X, _, _ = get_x_y_var(self)<EOL>if labels is None:<EOL><INDENT>labels = np.ones(self.num_data)<EOL>legend = False<EOL><DEDENT>else:<EOL><INDENT>legend = find_best_layout_for_subplots(len(np.unique(labels)))[<NUM_LIT:1>]<EOL><DEDENT>scatters = _plot_latent_scatter(canvas, X, sig_dims, labels, marker, num_samples, projection=projection, **kwargs)<EOL>return pl().add_to_canvas(canvas, dict(scatter=scatters), legend=legend)<EOL>
Plot a scatter plot of the latent space.

:param array-like labels: a label for each data point (row) of the inputs
:param (int, int) which_indices: which input dimensions to plot against each other
: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 kwargs: the kwargs for the scatter plots