Here is the explanation of the preceding code:
- The first three steps are familiar to you already from previous examples.
- divider = make_axes_locatable(axmain) defines the axes divider. It essentially locates the boundaries of the given axes.
- axtop = divider.append_axes("top", size=1.5, pad="15%", sharex=axmain) defines a new axis on top of the main axes, as follows:
- "top" specifies that the new axis to be plotted on top of the current axes.
- size=1.5 specifies that the height of this new axis is 1.5 inches, with a width the same as the main access width.
- pad=15% specifies that the gap between the main axes and this new axis on top is 15% of the height of main axes.
- sharex=axmain specifies that this new axis should share the ...