LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph multiplot

Solved!
Go to solution

Hi,

 

I have some questions about XY graph. Please kindly see the block diagram attached.

Basically, at each iteration, the program will generate one set of X-Y data and I wanted to plot all sets of X-Y data inside one graph. If I plot the function 'X-Y' graph inside the for loop, it will only show one plot, but if I put the 'X-Y' graph outside the graph, it will show all the plots at a time at the end. Is there a way that it will show plot one by one?

the second quesions is I want to show the plot legend as the applied bias, How can I control the plot legend? I am using Labview 2010. I right clicked the X-Y graph, then go to Create--> property node, I didn't see a property of plot legend.

 

Thanks,

Joyce

0 Kudos
Message 1 of 10
(7,056 Views)

Hi Joycezh

 

Yes you can, try using shift registers to keep the data and plot it again, here is an example that you can find in this link.

https://decibel.ni.com/content/docs/DOC-16243

Propery->legend->plots shown , here you can define how many plot do you want to show.

 

 

XY Graph example.jpg

 

 

 

 

Regards

Jaime Peña
National Instruments Mexico
Ingeniería de Aplicaciones
www.ni.com/soporte
0 Kudos
Message 2 of 10
(7,051 Views)

Hi Joycezh

 

If you cant find that property node explained in this link http://zone.ni.com/reference/en-XX/help/371653B-01/lvprop/wfmgrph_lgndplots_shwn/

 

, try with LegNumRows with the LegVis property Node enable

 

Regards

Jaime Peña
National Instruments Mexico
Ingeniería de Aplicaciones
www.ni.com/soporte
0 Kudos
Message 3 of 10
(7,044 Views)

All you need is drop the xy graph from the express palette. It includes the build xy graph express VI. To retain a history, configure it to retain data between calls.

 

You can configure all graph properties via property nodes (axis: xo, dx, axis label, etc; plot: label, etc.). This needs to be done only once, of course and not over and over in a loop. To change the plot legend, select property "plot...plot name"

 

Please attach your VI to make it easier to show the best modifications.

0 Kudos
Message 4 of 10
(7,026 Views)

I changed my program to this, however, it can only show 2 curves, why?

 

Thanks,

Joyce

0 Kudos
Message 5 of 10
(7,004 Views)

Hi, Altenbach,

 

Here is my VI. I am still lost on how to retain a history...

 

Thanks,

Joyce

0 Kudos
Message 6 of 10
(6,995 Views)

You need to put the array of accumulated plots into the shift register, not only the new plot.

 

Here's a quick revision (Also the legend property needs to be set only once before the loop).

Message 7 of 10
(6,988 Views)

Thanks, Altenbach, now it shows all the plots in the graph.

However, the legend is not correct, please see the attached. The legend "-0.70000' is actaully the name for the last plot (the blue curve).

Thanks,

Joyce

0 Kudos
Message 8 of 10
(6,976 Views)
Solution
Accepted by topic author Joycezh

property nodes execute to to bottom. You need to set the active plot before setting the legend. See attached.

Message 9 of 10
(6,972 Views)

Thanks a lot! It works!

 

Joyce

0 Kudos
Message 10 of 10
(6,965 Views)