LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add Text on Every Data Point in XY graph

Solved!
Go to solution

Hello,

 

I am trying to add a text label (E0, E1, E2 etc.) for every data point in XY graph. I am using Graph Annotation but it does not plot Text Name on graph for every data point but the last one. Any suggestions will be greatly appreciated. 

 

Note: I have modified the program posted by altenbach: https://forums.ni.com/t5/LabVIEW/How-to-do-a-XYZ-Scanning/td-p/3769433

0 Kudos
Message 1 of 4
(192 Views)

So you want to put a text label on every point of an XY Graph (why?), so you attach a reference to code @altenbach provided to you that doesn't do this.  That is not helpful!  And why do you want to label every point?  Show us what you did (which means attach your LabVIEW code, preferably in a version that most of us can open (i.e. something earlier than LabVIEW 2025).  How many points are you plotting?  If >5, how do you expect to see "Text for Every Data Point" on such a graph?

 

Bob Schor

0 Kudos
Message 2 of 4
(162 Views)
Solution
Accepted by topic author ponty2017

Your annotation array never has more than one datapoint because your use of the inplace element structure is completely pointless

 

Having a 9 second wait in the innermost of three stacked FOR loops means that the program will take forever until we see something. Do you want the annotations to update with each new element or do you want to just show all annotations at the end. In a well designed state machine, a single loop is typically sufficient.

 

To show them at the end, here's all you need to do.

 

altenbach_0-1760732828313.png

 

Else you would need to append to the annotation array, kept in a shift register.

 

(So far I have only done an olfactometric analysis of the rest of your code, but it smells quite a bit. 😄 )

 

Message 3 of 4
(146 Views)

Thank you both for your prompt response. I truly appreciate your support, and the LV community will always remain grateful to you both.

0 Kudos
Message 4 of 4
(136 Views)