LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically set number of plots

Hi All,

I want to make a copy of a graph from one of my screen to another one, in another screen.

However on the copy, I  don't need to display every channel from the other one. I have 30 plots on one graph and as few as the user decide (and a maximum of 30) on the other one.

Is it possible to change the number of plots programatically? This is to avoid to write the 30 channels to the second graph and make the unwanted channel transparent.

Thank you


0 Kudos
Message 1 of 5
(3,930 Views)
Just plot the ones you are interested in to the second graph.  If you want to names to line up, use the property nodes of the graph to change the channel names.  You can change the colors in the same fashion  Defer front panel updates while you graph and change properties for best performance.  Let us know if you need more info.
0 Kudos
Message 2 of 5
(3,899 Views)

hi didje

i have attached an example.

Mike

0 Kudos
Message 3 of 5
(3,897 Views)
Thank you for your answers.

That will work for my graphs.

Is it possible to do the same think with a Chart?
0 Kudos
Message 4 of 5
(3,892 Views)
Not really.  Charts are generally given data a point at a time (or a few points at a time).  You often do not have the full data set of each trace to replot (you would need a graph to do this replot).  However, you can still do what you want using the Plot.Visible property.  You will need to wire the same data to both charts.  Using a property node for the chart, first select the Active Plot, then set the Plot->Visible to TRUE or FALSE to show or hide the plot.

This method uses more memory than the previous one, since you have two charts with identical data.  There are more complex methods using a chart and a graph if you run into memory issues.
0 Kudos
Message 5 of 5
(3,869 Views)