Manipulating and combining existing graphs programatically
Wed, 04/29/2020 - 11:12 am
I often have a few data folders (DFs) where I'd like to view the contents -- as graphs. So, I'm currently trying to produce a Panel where I can click through different views in order to visualize the DFs.
I'm using a code package which already works fine to produce various graphs. So, I'm just looking to make a "wrapper" around pre-existing graph-producing functions.
My strategy has been to:
- Execute() the functions and macros which make graphs
- Use WinRecreation() to capture the recreation macros for the resulting graphs, and reproduce them inside a panel
- Kill the original graphs
This leads to some issues and confusion with wave paths in the WinRecreation result (which are sometimes relative and sometimes absolute) and also with ControlBar (I think I will need to remove all ControlBar commands for this to really work... or somehow programatically shift down all controls that would have been inside the ControlBar).
I'm starting to think I should take an alternative approach:
- Use NewPanel /EXT to produce an attached panel, so on any given graph I can jump to another graph.
- Just produce a lot of graphs and use the WindowBrowser to only show graphs for a given DF. Unfortunately, the WindowBrowser doesn't allow filtering by DF, only by wave. But I could use a keyword prefix.
- Just produce one reliable "mega graph" and then use ReplaceWave allincdf
With this post, I'm hoping for any insights from those who have more experience programming UIs in Igor. Thanks in advance, j