How to plot multiple datasets in one scatter Matplotlib scatter plot in Python

Multiple datasets can be plotted on the same Matplotlib plot, with different colors or shapes to distinguish between the datasets.

Solution for How to plot multiple datasets in one scatter Matplotlib scatter plot in Python : You can use matplotlib.axes.Axes.scatter() to plot two datasets on the same axis Retrieve the current axes with matplotlib.pyplot.gca(). Plot each data set for that axis with matplotlib.axes.Axes.scatter(xs, ys, color) with xs and ys as the x and y-values of the dataset and color as the desired color of the scatter plot points.


how-to-plot-multiple-datasets-in-one-scatter-matplotlib-scatter-plot-in-python