01-02-2020 11:12 AM - edited 01-02-2020 11:14 AM
Hello,
I have trying to dynamically move and resize plots in a MixedGraph plot and I am struggling with the latter part.
'Boolean 1' button allows me to move the Square wave from 'Group 0' to 'Group 1' and vice-versa while 'Boolean 2' moves the triangular wave from 'Group 0' to 'Group 2' and vice-versa.
So far so good....
However I have been trying to change the plot height of 'Group 1' whenever the square wave move Group but whatever I do (including the above), I end up changing the height of 'Group 2' instead!
what is going one here?!
Solved! Go to Solution.
01-03-2020 05:17 AM
AFAIK, What's going on is that this behavior is simply not supported.
I've been there, needing the same thing. I got the same "it must be me" feeling... Setting the height to 0 doesn't work, making the plot invisible doesn't work. It just doesn't seem possible to dynamically show\hide the plots... I gave up pretty fast, I learned to recognize when a fight against LabVIEW is futile 😫.
Too bad. The mixed graph are neat, but I never got to use it because it's inflexibility.
I ended up making multiple normal plots, and handle all the showing, hiding and scaling myself.
Of course the handling can be encapsulated in a class, so all the code is hidden from the main. In some cases, the handling code can even run in a parallel VI, dynamic or not, or callback events can be used. This would make it run with almost no code in the main.
Someone will probably mention it can be wrapped in an XControl, but I never fancied them.
01-03-2020 06:13 AM - edited 01-03-2020 06:13 AM
Solved it! 😃
you need to use the 'ActivePlotArea' Property Node to dynamically change the size of the plots.
I have attached my revised VI for anybody who may need an example on how to do it.
01-03-2020 06:21 AM
They're still there for the user to see. Not a solution for my application, but I'm glad it servers your needs.
Thanks for posting your solution!