LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Snap to closest graph point

Solved!
Go to solution

Do you want the closest point in terms of pixel distance or in terms of absolute distance. Since your x and y scales have very different scale, there will be a large difference between the methods.

0 Kudos
Message 11 of 16
(1,144 Views)

I think pixel distance would suffice for my needs

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 12 of 16
(1,142 Views)
Solution
Accepted by topic author PauldePaor
Message 13 of 16
(1,138 Views)

Of course you still need to polish it up, for example you need to add an event for the stop button. Also the subVI code is a bit messy. 😉

0 Kudos
Message 14 of 16
(1,121 Views)
Thanks very much for your help altenbach. Your knowledge holds no bounds
----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 15 of 16
(1,115 Views)

I know it's been like 8 years since this response, but I want to thank you for your incredible yet simple and elegant solution. I've been struggling with this problem for some years and I knew that I should use pixels to find the closest point, but I could never put together a solution.

 

Just threw off the window half of my code and pasted yours and worked like a charm.

 

Thank you, mr. Altenbach.

 

 

0 Kudos
Message 16 of 16
(660 Views)