matplotlib graph shows only points instead of line matplotlib graph shows only points instead of line numpy numpy

matplotlib graph shows only points instead of line


You missed the linestyle code in your .plot call:

plt.plot(x, y, 'ro-')

The - will create a solid line like so:

Line

If you want other styles, they are available in the documentation.