proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.07k stars 96 forks source link

Auto-offset "hanging" twin axes #51

Open lukelbd opened 4 years ago

lukelbd commented 4 years ago

Like this:

I think this is cleaner and more obvious than the current dualx and dualy behavior, which looks like this:

Although this might be more suitable for the workflow described in #46 -- permitting arbitrarily "stacked" objects along the sides of each axes.

lukelbd commented 4 years ago

In fact a really nice addition to the API might be to permit "axis legends", where instead of drawing a legend, we use color-coded, stacked, hanging x and y-axes, with axis labels instead of legend labels. This would be suitable for comparing data with vastly different ranges.

So many ideas, so little time...

lukelbd commented 2 years ago

Arbitrarily many twins are now implemented (see #226). The specific "hanging" axis feature is probably not high priority.

lukelbd commented 2 years ago

For those interested, it is now very easy to generate "hanging" axes in proplot with e.g. ax.altx(loc=('axes', 1.1)) -- although the positions are still not auto-adjusted. See this example from the website.