Implemented vanish, which swaps out the current graph and destroys the old one