# To subscribers of the xforms list from Bill Unruh <unruh@physics.ubc.ca> :
I am having problems with the XYPlot window in not reporting the mouse
cursor back properly. The position reported back seems to be (
variably) 0-15 pixels to the left of where the cursor actually is.
The program can be obtained from
www.theory.physics.ubc.ca/synth.html
which is a simply Fourier analyser. The program displays the input from
the recording in an xyplot window in a 1024 element plot. Once the
recording it made, you can click on the recording to delimit an area,
and I produce a red vertical via an overlay at the point reported
backfrom the program.
Thus, I plot the graph ( x=0..1023 by integer values, and y is an array
of points)
fl_set_xyplot_data(ui->xyplotgr,x,y,NMAX,"","","");
x and y here are arrays of floats of lenth NMAX=1024.
I get the cursor click postition via
fl_get_xyplot(ui->xyplotgr, &x, &y, &i);
Where here x and y are single float variables.
I then plot the locations of these points with
fl_set_xyplot_overlay_type(ui->xyplotgr,1,FL_IMPULSE_XYPLOT);
fl_add_xyplot_overlay(ui->xyplotgr,1,xo,yo,npts,FL_RED);
Where x0 and y0 are the points read above, npts=1.
And the location plotted is displaced to the left.
The results are variable. Sometimes the plot is dead on, and sometimes
over 5 poxels to the left. If I plot a grid, and place the cursor right
on the grid lines, It will report back that the location is to the left
of the grid lines. (eg placing a grid line at 200 (full graph is 0 to
1024) I will get a report back of an x value of say 192 for the tip of
the mouse arrow ( and the crosshairs of the x when the button is
pushed) which was placed exactly on the 200 grid line).
Mandrake 6.1, XFree 3.3.5, xforms .089
and Mandrake 7.1 XFree 3.3.6 xforms .89
Both display the same thing.
Note that this is not consistant. On some plots and on some areas
withing the plot the cursor report seems to much closer to correct than
on others. It almost seems that it depends on the rate of change of the
y points just at or near the cursor postion.
-- William G. Unruh Canadian Institute for Tel: +1(604)822-3273 Physics&Astronomy Advanced Research Fax: +1(604)822-5324 UBC, Vancouver,BC Program in Cosmology unruh@physics.ubc.ca Canada V6T 1Z1 and Gravity http://axion.physics.ubc.ca/ For step by step instructions about setting up ppp under Linux, see http://axion.physics.ubc.ca/ppp-linux.html_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Thu Dec 21 2000 - 16:17:02 EST