Is there a way to automatically resize a figure to properly fit contained plots in a matplotlib/pylab image?
I\'m creating heatmap (sub)plots that differ in aspect rat
just use aspect='auto' when you call imshow
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm X = 10*np.random.rand(5,3) plt.imshow(X, aspect='auto')
it works even if it is just for showing and not saving