LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Adding Plots to XY Graph

Highlighted

Hi All,

 

My VI starts by formating the graphs with plot names.  I used the attached property node to setup the plot names and legend formatting iteratively in a for loop.  This worked fine when I was using WF Charts, but when I switched to XY Graphs, I started getting error messages when I tried to format a plot that had not yet been added to the graph.  Is there a way to add plots programatically?  If not, is there another solution to my current problem?


Thanks!

Forbes Black
Lapsed CLAD, LV 2018
0 Kudos
Message 1 of 3
(1,049 Views)
Highlighted

Here is the for loop I use that worked fine with charts, but ran into problems with graphs

Forbes Black
Lapsed CLAD, LV 2018
0 Kudos
Message 2 of 3
(1,043 Views)
Highlighted

I figured out a solution.  I move the "Active Plot" property node to a separate property node, which I set to run after the first property node in which I set the number of rows in the legend (by connecting the error out connector in the first node to the error in connector in the second).  That way, the plot legend sets the correct number of plots before I try to choose the most recently added plot as the active plot.

Forbes Black
Lapsed CLAD, LV 2018
Message 3 of 3
(1,036 Views)