07-02-2019 10:22 AM
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
Solved! Go to Solution.
07-02-2019 12:31 PM
mcduff
07-02-2019 01:00 PM
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)
07-18-2019 09:05 AM
Thank you altenbach,
I used your solution, it works easily !