Scatter plots in Matplotlib – Data Visualization using Python

Scatter plots are one of the basic graphs used for data visualization. Scatter plot has following options, only first two are mandatory, rest all are optional.

plt.scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None, hold=None, data=None, **kwargs)

Here is simple program using scatter plot

https://gist.github.com/conquistadorjd/820c117b75d52514b2e58008be07a6eb#file-scatterplot-00-py

Output of this program is as below

Here is a bit complex scatter plot using matplotlib

https://gist.github.com/conquistadorjd/820c117b75d52514b2e58008be07a6eb#file-scatterplot-01-py

Output of above program

 

You can read documentation about scatter plot here.

CategoriesUncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *