This is a basic scatterplot example made with the plot()
function of Matplotlib. These arguments are passed to the function:
x
: x axis coordinates of the data pointsy
: y axis coordinates of the data pointsdata
: an object with labelled datalinestyle
: style of the lines between each pointmarker
: marker style of the points
# libraries
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Create a dataset:
df=pd.DataFrame({'x_values': range(1,101), 'y_values': np.random.randn(100)*15+range(1,101) })
# plot
plt.plot( 'x_values', 'y_values', data=df, linestyle='none', marker='o')
plt.show()