LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

managing plot legends at run time

Hi,
 
I have a graph for multiple plotting.
 
There are buttons on the front pannel to make the plots visible/not.
 
Is there any way to make the appropriate plot legends to make visible or not in accordance with the plots visibility?
 
Now if the user selects to see 3 plots then also it shows all the plot legends instead of three.
 
 
Thanks....
0 Kudos
Message 1 of 6
(2,814 Views)
Use a property node of Graph called 'Legend:Plots Shown' to vary the number of plots to display in plot legend
Message 2 of 6
(2,808 Views)
Thank you so much for your reply.
 
My problem is there are totally 10 plots.
 
Suppose user wants to view only 3.Then in graph there are 3 plots.But Plot legends 10.
 
If I am using the property node u specified,is it possible to achieve that?
 
The user may be selecting plot2,plot 6 and plot 9.
 
Then the legends shown should be plot2,plot6 and plot9 only.
 
Thanks once again
0 Kudos
Message 3 of 6
(2,805 Views)
Well, here is a vi that can serve as a pointer with respect to the property nodes that can be of use for your requirement
 
After you make the plots visible/invisible, redefine the Legends: Plots shown and rename the displayed plots
Message 4 of 6
(2,802 Views)
Thank you so much sir.
 
Thanks for the information.
 
But still i have something to disturb you again.
 
If i am viewing random plots will it be ok?
 
ie,after the user runs the appln,all the ten plots will appear.Nw if he is going to view only 3 plots,it may be any 3(from 1 to 10) by switching off the other 7
will there be any problem?. 
0 Kudos
Message 5 of 6
(2,794 Views)
Hi user_1,

As long as you know the order of the remaining plots and can name them accordingly, this method should work just fine for arbitrarily disabled plots.

That is,

1   Disabled
2   ****
3   Disabled
4   ****
5   Disabled


If you know that 2 and 4 are the remaining plots, name the plot legend accordingly after you have resized it to 2 elements with Legend:Plots shown.

Best regards,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 6 of 6
(2,747 Views)