In this tutorial we will be generating a scatter plot in Python, to do this will be using the matplotlib library which enables to pyplot functions to help us achieve what we are wanting.
The script will make use of two data arrays of equal size, one of which will be applied to our X axis and the other our Y axis. A sample of out data arrays can be seen below, both of which contain ten data points.
xAxis = [1,2,3,4,5,6,7,8,9,10]
yAxis = [55,66,69,72,85,92,101,95,82,75]
To generate the scatter plot we used snippet of code below.
import matplotlib.pyplot as plt
xAxis = [1,2,3,4,5,6,7,8,9,10]
yAxis = [55,66,69,72,85,92,101,95,82,75]
plt.scatter(xAxis,yAxis)
plt.show()
The code above returns the following scatter plot.
