Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Deleting a line in matplot lib
fig = figure()
ax = fig.add_subplot(111)
x = linspace(0,10)
plot(x, sin(x), label='sin')
plot(x, cos(x), label='cos')
# Deleting the last one
del ax.lines[1]
draw() # updating the fig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.