- spac.visualization.visualize_2D_scatter(x, y, labels=None, point_size=None, theme=None, ax=None, annotate_centers=False, x_axis_title='Component 1', y_axis_title='Component 2', plot_title=None, color_representation=None, **kwargs)[source]
Visualize 2D data using plt.scatter.
- Parameters:
x (array-like) – Coordinates of the data.
y (array-like) – Coordinates of the data.
labels (array-like, optional) – Array of labels for the data points. Can be numerical or categorical.
point_size (float, optional) – Size of the points. If None, it will be automatically determined.
theme (str, optional) – Color theme for the plot. Defaults to ‘viridis’ if theme not recognized. For a list of supported themes, refer to Matplotlib’s colormap documentation: https://matplotlib.org/stable/tutorials/colors/colormaps.html
ax (matplotlib.axes.Axes, optional (default: None)) – Matplotlib axis object. If None, a new one is created.
annotate_centers (bool, optional (default: False)) – Annotate the centers of clusters if labels are categorical.
x_axis_title (str, optional) – Title for the x-axis.
y_axis_title (str, optional) – Title for the y-axis.
plot_title (str, optional) – Title for the plot.
color_representation (str, optional) – Description of what the colors represent.
**kwargs – Additional keyword arguments passed to plt.scatter.
- Returns:
fig (matplotlib.figure.Figure) – The figure of the plot.
ax (matplotlib.axes.Axes) – The axes of the plot.