10-17-2025 12:12 PM - edited 10-17-2025 12:13 PM
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
Solved! Go to Solution.
10-17-2025 02:05 PM
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
10-17-2025 03:30 PM
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.
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. 😄 )
10-17-2025 04:24 PM
Thank you both for your prompt response. I truly appreciate your support, and the LV community will always remain grateful to you both.