Skip to content

Instantly share code, notes, and snippets.

@mattions
Created November 25, 2009 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattions/242635 to your computer and use it in GitHub Desktop.
Save mattions/242635 to your computer and use it in GitHub Desktop.
# 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