This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
def move_axes(ax, fig, subplot_spec=111): | |
"""Move an Axes object from a figure to a new pyplot managed Figure in | |
the specified subplot.""" | |
# get a reference to the old figure context so we can release it | |
old_fig = ax.figure | |
# remove the Axes from it's original Figure context |