LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing Mixed graph plots

Solved!
Go to solution

Hello,

 

I have trying to dynamically move and resize plots in a MixedGraph plot and I am struggling with the latter part.

 

Capture.PNGFalse.PNG

 

True.PNG

'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?!

0 Kudos
Message 1 of 4
(3,005 Views)

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.

0 Kudos
Message 2 of 4
(2,880 Views)
Solution
Accepted by topic author sherzaad

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.

Message 3 of 4
(2,854 Views)

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!

0 Kudos
Message 4 of 4
(2,847 Views)