Using iPython and matplotlib, I want to be able to add an annotation (or any object), remove it from the graph, and then re-add it. Essentially I want to toggle the appearance of the object in the graph.
Here is how I am adding and removing this object. The object still exists after the remove(). But I can't figure out how to make it reappear in the graph.
an = ax.annotate('TEST', xy=(x, y), xytext=(x + 15, y), arrowprops=dict(facecolor='#404040'))
draw()
an.remove()