Some of the links on this page may be affiliate links, which means we may get an affiliate commission on a valid purchase.
#Matplotlib scatter plot license
This work is licensed under a Creative Commons Attribution 4.0 International License Download Python source code: scatterplot.py Download Jupyter notebook: scatterplot. To build a scatter plot, we require two sets of data where one set of arrays represents the x axis and the other set of arrays represents the y axis. To represent a scatter plot, we will use the matplotlib library. The dots in the plot are the data values. If you have any questions, comments or recommendations, please email me you enhanced your knowledge and practical skills from this article, consider supporting me on Scatter plot in Python is one type of a graph plotted by dots in it. You can use scatter plots to explore the relationship between two variables. Each row in the data table is represented by a marker the position depends on its values in the columns set on the X and Y axes.
Python for Data Analysis: Pandas & NumPy.show ()Įnhance your skills with courses on Python As this explanation implies, scatterplots are primarily designed to work for two-dimensional data. legend_elements (), list ( set ( df ))) plt. A scatterplot is a plot that positions data points along the x-axis and y-axis according to their two-dimensional data coordinates.