Python MatplotlibLesson 65Free preview
Matplotlib Scatter
This lesson is part of Python · All levels
Summary
The scatter plot displays each observation as a single point so that the pattern of relationship between the two variables is clearly visible. The function plt.scatter(x, y) draws the dots, and can be colored by the argument c and measured by s. Alpha values regulate the level of transparency, which is very helpful when dots accumulate. Scatter is the primary tool for checking correlations before building a machine learning model.
Key points
- The scatter plot describes each data as a single point
- Arguments c set the color and s set the size of the point
- Alpha sets the transparency for accumulated data
- Scatter helps to see correlations and outliers
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.