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
def add_ax_to_fig(ax, fig=None, geometry=(1,1,1)): | |
# def add_ax_to_fig(ax, fig=None, geometry="111"): | |
oldfig = ax.figure | |
if fig is None: | |
fig = figure() | |
if ax.get_geometry() != geometry: | |
ax.change_geometry(*geometry) | |
# if ax.get_position() != geometry: | |
# dummy = fig.add_subplot(geometry) | |
# ax.set_position(dummy.get_position()) |