LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Knowing the pixel size of a graph

Solved!
Go to solution

Hi everyone,

I have made a graph (file named Capture) on which the green circle and rectangle are moving together horizontally.

The position of everything are defined with the scale except the position of the rectangle which is defined with the pixel position (0,0 is the upper left corner).

 

So when I make the graph bigger (file named Capture2), everything moves correctly with it expect the rectangle as it is defined with the pixels.

So I would like to know if it is possible to know the size of the graph in pixels. This way I can make the rectangle move and change his size correctly.

 

Thank you for your help,

Lea

 

Download All
0 Kudos
Message 1 of 4
(1,966 Views)

snip.png

 

mcduff

0 Kudos
Message 2 of 4
(1,939 Views)
Solution
Accepted by topic author Lea.R

You don't need to know the size in pixels, just how to translate screen coordinates into plot coordinate and vice versa.

 

Get an invoke node and chose methods Map Coordinates To XY or Map XY To Coordinates as appropriate (details)

0 Kudos
Message 3 of 4
(1,933 Views)

Thank you altenbach,

 

I used your solution, it works easily !

0 Kudos
Message 4 of 4
(1,881 Views)