Line plots are the workhorse of scientific plotting and time-series analysis. They connect sequential data pairs $(x_i, y_i)$ with straight line segments to show continuous progression.
Connecting sequential dots on graph paper with a steady pen. If you omit the X coordinates, Matplotlib automatically supplies indices `[0, 1, 2, ..., N-1]`.
Calling `plt.plot(y)` automatically sets `x = range(len(y))`. Calling `plt.plot(x, y)` explicitly binds custom X coordinates.
plt.plot([10, 20, 15]) # x defaults to [0, 1, 2]Avoid the top errors and bad plotting practices that trip up new Python developers
Switch from abstract numbers to relatable Cricket, Cinema & Business charts
Write Matplotlib code to solve the objective and see your live plot render
Plot `x = [1, 2, 3, 4]` and `y = [1, 8, 27, 64]` with `color='#FF5C7A'` and `linewidth=3`.
✓ plt.plot✓ linewidthTest your understanding to unlock the lesson completion badge