LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Translating a graph into number of points

Hi

 

I am trying to represent a XY graph plot in points however I am not sure how to do this. Also can I specify a number of points displayed on the graph.

 

Thank you

0 Kudos
Message 1 of 16
(2,856 Views)


BobLondn wrote:

Hi

 

I am trying to represent a XY graph plot in points however I am not sure how to do this. Also can I specify a number of points displayed on the graph.

 

Thank you


put an XY graph on the front panel, press ctrl + h which brings up context help. Hover over the graph with your mouse and context help will show you what to do. In order to determine the number of points displayed, modify the array you are passing to the graph. For isntance, only take every other point etc.

0 Kudos
Message 2 of 16
(2,854 Views)

Have you taken a look at the examples that ship with LabVIEW? There are examples showing you how to use XY graphs. I also don't understand what you mean by trying to represent an XY graph plot in points. An XY graph is merely a graphical representation of points, so I don't understand what you are trying to do. Can you please elaborate (after you've looked at the examples)?

0 Kudos
Message 3 of 16
(2,846 Views)

@smercurio_fc wrote:

An XY graph is merely a graphical representation of points, so I don't understand what you are trying to do. Can you please elaborate (after you've looked at the examples)?


I agree...maybe he means he doesn't want the points connected, or a line. In order to do this, right click the graph and choose properties. Within properties you can choose how to represent points on your graph (points, line, points connected by a line, etc). K, done guessing for now Smiley Tongue

0 Kudos
Message 4 of 16
(2,842 Views)

 

 

 

Thank you for your quick reply and for your suggestions. I did manage to find how to also add points to the XY graph.
Although i wanted to know if i have a plot representing sound when x axis=time=5s. How can i represent the plot with say 40 points? At the moment i can only get as many points as the number of x which in this case is 5.

 

Thank you

 

 

0 Kudos
Message 5 of 16
(2,826 Views)

What are your X values?  If you want 40 points in 5 seconds, then each X value needs to be .125 higher than the previous one.  (5/40 = 1/8)

0 Kudos
Message 6 of 16
(2,800 Views)

Hi

 

Sorry for the little delay in posting the graph.

 

here i have the graph with two plots. My problem is that the number of points on each plot is the same as the number of loop iterations (equal to N). i want to be able have more points on the plots. do you guys know of any ways to do that

 

Thank you

0 Kudos
Message 7 of 16
(2,755 Views)

Each plot can have a different number of points. Just use two loops. You can even used different x-values instead of [i].

 

(If the increment is the same and linear as in your example, use a waveform graph instead. No need for XY)

 

0 Kudos
Message 8 of 16
(2,750 Views)

And if you want the same x-range, but a different number of points you could do something as follows.

 

(There are many ways to do all this!)

 

Download All
0 Kudos
Message 9 of 16
(2,744 Views)

Hi

 

Thank you for your replies, i have been helped a lot.

 

i have tried them however i still cant get it done.

 I want to be able to have the plot for 20 milisecs and to represent it with a number of points that can bee 50 points or it can be 10 points according to my settings.

 

Mind you on the for loop i have a lot of other code.

 

thank you

0 Kudos
Message 10 of 16
(2,732 Views)