LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change plot visibility from legend

Is there a way to change the plot visibility on an xy graph from the legend control similar to how you can click on the icon of the plot and change the color, line style, line width, etc.

 

There isn't a option in the drop down list for this but maybe it can be programatically added to the drop down menu?

 

Thanks

0 Kudos
Message 1 of 7
(4,160 Views)

Why exactly do you want to add it to the drop down menu? 

 

Here is how you programatically change the visibility of a plot:

 

xy_plot_visible.png

 

(I don't know why the snippet changed the way this was linked, but you can statically link the properrty node also).   You can use this with a series of checkboxes that indicate whether a plot is to be displayed or not.

 

Hope this helps.

 

Matt

0 Kudos
Message 2 of 7
(4,137 Views)

I have used a series of checkboxes before to change the visibility through a property node but when you have alot of  plots on the graph (30+), they can't all be displayed on the screen at the same time so LabVIEW puts a vertical scrollbar in the legend. It then gets hard to relate the checkboxes to the plots in the legend.

 

I would like to find a way to change the visibility through the legend shorcut menu because the legend shortcut menu works well for changing plot color, line style, line width, etc. when you have alot of plots in the legend and it is using the vertical scrollbar.

 

Thanks

0 Kudos
Message 3 of 7
(4,122 Views)
Not sure at all what you are asking for. As the image in your original post shows, you can make plots invisible from the legend. Just color it transparent.
0 Kudos
Message 4 of 7
(4,118 Views)

I want to be able to change the Plot.Visible? property from the shortcut menu that pops up when you left click on a graph legend. This can be done programatically as mtat76 demonstrated above, however I want to find a way to add it to the shortcut menu that comes up when you click on the legend. That way in addition to being able to change the color, line style, line width, etc. from the shortcut menu, you could also change the visibility of the plot.

 

The problem with just coloring it transparent is that you lose the last color that the plot was. So if a plot was red (or any other color) and you changed it to transparent to hide it, you would have to find that color again in the color palette. It is also not intuitive to the user to tell them to just color the plot transparent to hide the plot.

Message Edited by d_sdl on 09-16-2009 03:57 PM
0 Kudos
Message 5 of 7
(4,110 Views)
While you can easily modify the graph's runtime menu, I don't know of a way to modify the legend's menu. It doesn't even seem to fire the Shortcut Menu event.
Message 6 of 7
(4,097 Views)

Hmmmm....Dennis is right (and  by the way, it's Matt :manhappy:).  However, there maybe a more involved solution to this - if you can define the location of the legend, maybe you could use a hotkey that, when pressed while hovering over the legend entry changes the visibility of the plot.  But, like I said this is pretty involved.

 

30 plots, though?  That makes my brain hurt.  Is there some way to break the number of plots out or collapse the number of plots?  From a human interaction standpoint, a graph containing 30 plots just doesn't seem very useful  - it's just too many to visualize and make sense of.  (And the reason I am guessing you are seeking this functionality).

 

Matt

Message 7 of 7
(4,074 Views)