In the Line Chart Plot session, we discussed how to use plt.plot() to draw the line chart. It also can be used to produce a scatter chart. Since it is a scatter plot, we can use plt.scatter() as well.
x = np.linspace(0, 10, 50)
y = np.sin(x)
fig,(ax1,ax2) =plt.subplots(1, 2, figsize = (12,6))
ax1.plot(x, y, 'o', color='firebrick') # plt.plot()
ax1.set_title('plt.plot way')
ax2.scatter(x, y, marker='o', color='m'); # plt.scatter()
ax2.set_title('plt.scatter way')
2. Markers
We can use Markers to customize a scatter plot, make it more stylish.
For example, we use "star" to draw the same curve.