LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing multi-plot chart history for only one specific plot?

I can't figure out how to clear the chart history of a waveform chart for only two out of four overlayed plots. Can anybody help me out?
0 Kudos
Message 1 of 9
(4,230 Views)
The best suggestion I can offer is to do this with the array of input data. In other words, you are going to have to store the current waveform data, including history that isn't displayed (if necessary), clear the chart, and re display the saved data, minus the "cleared" charts' corresponding arrays.
0 Kudos
Message 2 of 9
(4,226 Views)
If you simply just dont want to see it anymore, turn its color to transparent.

Otherwise, use "History" from a Chart property node, delete the array series you dont want, and then reapply the array to the "History" propery.

See attached VI for demo how to delete a series.
Message 3 of 9
(4,226 Views)
One more solution you might consider would be to set the history data for only the plots that you do not want to zero. The history data for a waveform chart with multiple plots is in the form of an array of clusters. You could index through the array, unbundle the cluster, and replace the plots histroy data with zeros. I will attach a file that illustrates this.
Message 4 of 9
(4,227 Views)
My application needs exact same thing. But, I would want the user to control ON/OFF of the plots in multi plot overlaid display. I believe making the color of individual plot transparent is perfect solution for my application. Please let me know where and how do I access that property of the waveform?
 
 
0 Kudos
Message 5 of 9
(4,035 Views)


@BrandonS wrote:
One more solution you might consider would be to set the history data for only the plots that you do not want to zero. The history data for a waveform chart with multiple plots is in the form of an array of clusters. You could index through the array, unbundle the cluster, and replace the plots histroy data with zeros. I will attach a file that illustrates this.



This is a good solution, but here's one suggestion:  Use "NaN" instead of "0" when "deleting" the history - NaNs don't get plotted, whereas zeroes do.

Jaegen

0 Kudos
Message 6 of 9
(4,034 Views)

Thanks Jaegen.  Using this solution I believe that we are deleting the whole history of that plot in the multiplot waveform and I can not re-display the chart unless I use stored data. Which is the reason that I want to use transperant property which will allow me to keep the plot in the history and re-display it by changing back to non-transperant color.

0 Kudos
Message 7 of 9
(4,031 Views)
spider_11,

If all you want to do is programmatically show or not show certain plots you just use the Plot.Visible property in a property node for the graph or chart.  You need to set the active plot first.  If you want to set a bunch of plots invisible or invisible at once, use a single property node and expand it to set multiple properties at once, then your first property would be ActivePlot to select the plot number, then Plot.Visible, then this would repeat with each plot you want to set visible or invisible.
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 8 of 9
(4,003 Views)
That's perfect. Thanks Doug.
0 Kudos
Message 9 of 9
(3,993 Views)