I have a function that returns a matplotlib.image.AxesImage object and I would like to plot two of these objects side by side in the same figure. I tried something like this:
fig, (ax1, ax2) = plt.subplots(ncols=2)
ax1 = function_that_returns_AxesImage(some_arguments) # tried to reassign ax1
ax2 = function_that_returns_AxesImage(other_arguments) # tried to reassign ax2
However, that just produces a figure with two empty subplots and the two plots I want are plotted in a column, and not side by side (see current plots output here). My problem is that I have to use the function_that_returns_axes, and I don't know how to put the returned plots into subplots. Alternatively, if I could just display two figures side by side in Jupyter, that could work too.