plotting autoscaled subplots with fixed limits in matplotlib <p>What's the best way in matplotlib to make a series of subplots that all have the same X and Y scales, but where these are computed based on the min/max ranges of the subplot with the most extreme data? E.g. if you have a series of histograms you want to plot:</p> <pre><code># my_data is a list of lists for n, data in enumerate(my_data): # data is to be histogram plotted subplot(numplots, 1, n+1) # make histogram hist(data, bins=10) </code></pre> <p>Each histogram will then have different ranges/ticks for the X and Y axis. I'd like these to be all the same and set based on the most extreme histogram limits of the histograms plotted. One clunky way to do it is to record the min/max of X/Y axes for each plot, and then iterate through each subplot once they're plotted and just their axes after they're plotted, but there must be a better way in matplotlib.</p> <p>Can this be achieved by some variant of axes sharing perhaps?</p>