10-14-2021 03:22 AM - edited 10-14-2021 03:23 AM
I am using Labview 2017
I want to make a vi which get a waveform graph refnum and set the color of the plots
I understand how to change the color of plot using the Active plot and Plot color property when I know the index of the plot
But I don`t know how to iterate all plots of the Waveform Graph when I don`t know the number of plots
Is there any way to get the number of plots or iterate over the plots
10-14-2021 08:31 AM
How did the plots get into the graph in the first place?
Somewhere in the program you created the graph. In that part you put N sets of data into the graph. Or put in a 2D array that you can get the dimensions of. Determine that N and pass it to the part of the program where you are dealing with the colors either using a shift register, or a value property node or a local variable.
10-14-2021 10:35 AM
This is the easiest way I know of to tell the number of plots in a waveform graph.
05-07-2024 05:47 AM
This is the easiest way!
05-07-2024 08:48 AM
you might take a look at this very fine example, especially look at the top-level.vi and inside the "Format Plot".vi
https://forums.ni.com/t5/Example-Code/LabVIEW-Box-Plots/ta-p/3506533
05-07-2024 10:31 AM
Hi Des1gnR,
@Des1gnR wrote:
This is the easiest way!
Your way potentially creates very large data copies in memory just to determine an array size. And it depends on pre-defined datatypes of the graph…
Darrens example is very quick, without large data copies!