Using this thread I attempted to load a figure from a pickle
file, pull out its axis (which contains the plot I'm speculating?) and plot the axis on an existing figure as a subplot.
fig = plt.figure(figsize=(16,12))
gs = fig.add_gridspec(4,2)
amb = pickle.load(open('/path/to/pickle.pkl', 'rb'))
ax_amb = amb.axes[0]
ax_amb.remove()
ax_amb.figure=fig
ax5 = fig.add_subplot(gs[3, 1])
ax_amb.set_position(ax5.get_position())
ax_amb.set_subplotspec(gs[3,1])
fig.axes.append(ax_amb)
The problem is that it shows a blank axis in the [3,1]
position when I run plt.show()
, and nothing is plotted.