Delete line from matplotlib.pyplot

Two of many ways to do this: delete all lines delete one line using the line instance Delete all lines Import needed modules (numpy is only used to generate data): Generate dummy data and plot: Creates this plot: Get current instance of current axes: Loop through all lines and delete them: You may think that …

Design a site like this with WordPress.com
Get started