gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
277 stars 61 forks source link

CURSOR does not return data coordinates. #1901

Closed jtappin closed 2 weeks ago

jtappin commented 2 weeks ago

It seems that at present (8461fee0), the cursor procedure is not correctly returning data coordinates, but is returning normalized coordinates instead. (e.g.

GDL> plot, findgen(20)^2
GDL> cursor,x,y & print, x, y
      0.75605942      0.70792768
GDL> cursor,x,y, /dev & print, x, y
         964         505
GDL> cursor,x,y, /data & print, x, y
      0.75840500      0.72183588
GDL> print, convert_coord(x,y,/norm, /to_data)
       15.153903       290.74051       0.0000000

Where each time the click was in the vicinity of (15,300), the convert_coord result shows that the plot transform is correctly set and remembered, it's just cursor not using it.

Running Linux on AMD-64 architecture.

GillesDuvert commented 2 weeks ago

nice bug, may have been there from quite long. #1903 patches it.