This PR completely refactors the code that generates plot layouts. The quick upside is that this completely fixes the longstanding issue with plots that have non-unit aspect ratios. See e.g. Issue #735.
To make that a bit more concrete, take a look at the following test plotting script:
This introduces some design changes in the plotting code:
Moves the layout code to ImagePlotMPL. The layout constants are still calculated in subclasses, making it possible to have custom layouts for PlotWindow and PhasePlot.
Fixes a bug where colorbar and axis toggling do not persisting if a plot is modified after the element is toggled.
set_font now preserves the family and size settings, which we have custom defaults for.
Added set_font_size. I find it useful to have this but I'll remove it if anyone thinks it clutters the API.
Update: responding to comments.
Thanks for taking the time to go through all of this, @ngoldbaum . I'm really happy to see these cool improvements.
Hi @ngoldbaum this looks great. I tested your stuff in the notebook, and they are definitely improvements. It is also worth noting that the (matplotlib) dpi is another handle on how figure size can vary. I agree with the setup now to leave it a 10 inches and figure out a way to handle notebook optimizations later.
I think this is good to go. @chummels if you're satisfied, hit the button.