From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change XY chart properties of all plots to points only?

Solved!
Go to solution

Hi, 

 

I am using an XY Graph to do multiple plots. Please see the image attached. Each of the point is an individual plot with (single X & Y coordinate).

Please see the image attached. 

 

By default, the plot is in the line style (meaning no points will be shown). So for each of the plots (plots 1 - 25), I have had to go to the properties of each plot and change it to points. This is not an efficient way to do so. Is there an automatic way of changing the line graph to points only  rather than going to each points properties and changing it? 

 

Thanks,

Neeraj 

 

0 Kudos
Message 1 of 4
(3,011 Views)
Solution
Accepted by nam2981

Yup, easy to do with property nodes! Right click your graph and select Create -> Property Node -> Active Plot. Expand the list down to include Plot.PointStyle and Plot.Interpolation. Set those to 1 and 0, respectively (the first picks what style of point you want and the second turns off the interpolation line).

 

You will need to call this for each plot in your XY graph- you must write Active Plot first, then whatever Plot variables you want to set, so you will need to write ActPlot to 0, then set Point Style and Interpolation, then write ActPlot to 1, set point style and interpolation, and so on.

 

Just stick it in a For loop and wire the i terminal to the ActPlot input and run the loop a number of times equal to the number of plots you want to display and you're done.

Message 2 of 4
(3,003 Views)

That worked! Thank you very much. 

0 Kudos
Message 3 of 4
(2,985 Views)

For a more generic solution, use a while loop and terminate on error. This way you don't even need to know how many traces you have.

Message 4 of 4
(2,974 Views)