January 2019
Beginner
318 pages
8h 23m
English
This type of plot shows us the data as a collection of points. It offers a convenient way to visualize how numeric values are related. It also helps us to understand the relationships between multiple variables. We are going to use the scatter() method to plot the data in a scatter plot. In a scatter plot, the position of points depends on its x and y axis values; that is, two-dimensional values, so each value in a dataset is a position in either the horizontal or the vertical dimension. Let's look at an example of a scatter plot. Create a script called scatterplot_example.py and write the following content in it:
import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-2,2,100)y = np.random.randn(100)colors = np.random.rand(100) ...
Read now
Unlock full access