Menu

#353 double y axis on plots

open
nobody
None
5
2019-07-01
2014-04-17
No

Several people have asked that it would work to have multiple y axes on one plot. The idea is you could have temperature and density on one plot, for example, saving space on the page. This is supported in das2 mostly, but Autoplot's internal model assumes each axes has the same row and column as the plot it controls. You can generate fairly acceptable results with a script that sets this up using controller nodes, but this will not save in the vap. Also it would be nice to be able to show the axis on the right-hand side of the page.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2014-04-17

    Image showing double axis set up by a script, showing both electrons and ions on one plot.

     

    Last edit: Jeremy Faden 2014-04-17
  • Jeremy Faden

    Jeremy Faden - 2014-04-17

    Several things are needed:
    1. altLayout property points to alternate column for yaxis and colorbar, row for xaxis. Note that colorbars already have an alternate column that is implemented automatically. Now it can be controlled.
    I should also consider having separate subclasses for y and x axis. Maybe the plot should have an alternate column.
    2. oppositeAxis property boolean for using the alternate side of the plot.

     
  • Jeremy Faden

    Jeremy Faden - 2019-07-01

    There's a property "opposite" which will use the right side instead of the left side, and then two plots can share a row.

    I was thinking we had added an offset, so that a second axis could be used which was accessible when scripting, but I don't see it now.