Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1081
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Gnuplot canvas terminal mouse coordinates |
| Followup-To | comp.graphics.apps.gnuplot |
| Date | 2012-05-07 12:24 -0700 |
| Organization | gnuplot development team |
| Message-ID | <jo97h4$ln4$1@dont-email.me> (permalink) |
| References | <968a7822-6927-42ce-9d26-0d6e2378bb3d@r9g2000yqd.googlegroups.com> <jo3jp9$96e$1@dont-email.me> <1945c48e-af3e-4823-a748-55bc2d280745@a3g2000vbm.googlegroups.com> |
Followups directed to: comp.graphics.apps.gnuplot
gflesch@jpl.nasa.gov wrote: > I should mention that I do these graphs all the time with the X11 > driver and the mousing resolution works fine. And, since Gnuplot is > properly labeling the canvas graph, I think it's getting the right > numbers from me. The mouse coordinates in X11 are calculated and printed by gnuplot itself, which is written in C and uses C language output formats. The mouse coordinates from the canvas terminal as displayed in a browser are calculated and printed by the browser's javascript interpreter using the code in gnuplot_mouse.js. So there's no overlap in the code, and it's not so surprising that the result is not identical. > Is there a Gnuplot-related canvas driver variable that would limit > resolution? Anything I can set/show? You can change the number of decimal places that are printed by replacing, for example, x.toPrecision(4) with x.toPrecision(8) in gnuplot_mouse.js. However, if the underlying problem is accuracy rather than precision then that's not going to help. It is possible, for example, that the browser updates the mouse position in coarser increments than 1 pixel. I know that's true for the mouse wheel, but I don't know any details about general mouse tracking in a browser. A similar issue was raised recently on the developer's mailing list with regard to mouse tracking in SVG documents. There again both the number of decimal places and the precision with which the current mouse position is provided by the document viewer are relevant. > The X values changes from 3593 to 3594 when I move around 3593.5 > instead of in the neighborhood of 3594. Maybe a difference in rounding floats to ints in javascript v. C? Ethan
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Gnuplot canvas terminal mouse coordinates gflesch@jpl.nasa.gov - 2012-05-03 17:21 -0700
Re: Gnuplot canvas terminal mouse coordinates sfeam <sfeam@users.sourceforge.net> - 2012-05-05 09:16 -0700
Re: Gnuplot canvas terminal mouse coordinates gflesch@jpl.nasa.gov - 2012-05-07 08:57 -0700
Re: Gnuplot canvas terminal mouse coordinates sfeam <sfeam@users.sourceforge.net> - 2012-05-07 12:24 -0700
Re: Gnuplot canvas terminal mouse coordinates gflesch@jpl.nasa.gov - 2012-05-07 14:14 -0700
Re: Gnuplot canvas terminal mouse coordinates gflesch@jpl.nasa.gov - 2012-05-07 09:09 -0700
csiph-web