LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drawn Circle on Intensity Graph is not centered on cursor

Solved!
Go to solution

Hello! I'm working on a RoI integration VI which involves a pair of concentric circles where everything in between the two would be summed up. The mathematical portion is working perfectly but I am having difficulties with implementing the "Draw Circle by Radius" VI on my intensity plot to visually inform the user where exactly are their integration circles. What am I doing wrong below?

image.pngimage.png

0 Kudos
Message 1 of 4
(2,373 Views)

I think you are getting coordinates from the top left of the screen, but the picture functions are in pixels measured from the top left corner of the graph.

Message 2 of 4
(2,344 Views)
Solution
Accepted by topic author lukewarmcoffee

Dr Powell is right - you have an offset because of the coordinate systems. You need to subtract the location of the top-left point of the Draw Area (not the bounds of the graph)

Code with Waveform GraphCode with Waveform Graph

When I tried this with an Intensity Graph, I initially didn't have any luck. It seems as though with no data plotted, it doesn't come in front properly. Perhaps a bug?

With the code added below to set the graph data, I got the expected outcome. (This shouldn't be a problem for you because you already have valid data, but I thought it worth mentioning).

cursorIG.png

 


GCentral
Message 3 of 4
(2,298 Views)

Both suggestions (and sample code) fixed the problem! Thank you!

0 Kudos
Message 4 of 4
(2,232 Views)