LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i clear specific plot in a multiplot XY graph?

Suppose i have 5 plots on a multiplot XY graph. What should i do so that a user can, for example, just clear the second plot?

Thank You
Benny
0 Kudos
Message 1 of 7
(4,102 Views)
One way to do this is to make the color of the plot Tranparent. Create a property node and wire the index of the plot you want to "hide" to the Active Plot object (0 is the first plot). Then for the Plot.Color object wire the value for Transparent (use color box terminal for easy color assignment).

See the attached.

~Tim
0 Kudos
Message 2 of 7
(4,102 Views)
Hi,
Another way to do is to assign an empty cluster array to the channel you want to cancle, just as the attachment.
0 Kudos
Message 3 of 7
(4,102 Views)
> Suppose i have 5 plots on a multiplot XY graph. What should i do so
> that a user can, for example, just clear the second plot?
>

If you want the user to be able to hide the second plot, to lessen the
clutter and better see the other plots, you can give them a button to
set the color of the plot to transparent. Or you can train them to do
the same using the legend.

The other thing to do, if you want the plot to truly be cleared, you can
rewrite the data to the graph, but with the second array as an empty
array.

Greg McKaskle
0 Kudos
Message 4 of 7
(4,102 Views)
Thanks you guys for you help.

Regards
Benny
0 Kudos
Message 5 of 7
(4,102 Views)
An even cleaner way is to use the same property node and instead of changing the color to transparent, toggle the boolean property Plot:Visible?

This eliminates the need to remember the color of the plot before you turned it off.

This approach and the transparency suggestion are the best since they keep the information inside the XY Graph constant. The other suggestions that eliminate an element of the plotting array are changing the information.
0 Kudos
Message 6 of 7
(4,102 Views)

You could store all your plots in an array and simply delete the desired plot from this array, make sure you write the entire array to the graph each iteration of the loop. Keep things simple, avoids hassel later on in development.

Regards

Andy
_______________________________________

"To 'G' and not to 'C', this is not a question!"
0 Kudos
Message 7 of 7
(3,277 Views)