plt.figure() plt.stem(residuals, markerfmt='ro', linefmt='b-', basefmt='k-') plt.xlabel('Data Point Index') plt.ylabel('Absoluate Residual') plt.show()