|
From: <pl...@pi...> - 2008-12-22 00:53:16
|
Ethan A Merritt wrote: > On Sunday 21 December 2008, pl...@pi... wrote: >> I have had another think about adding functionality to svg terminal. >> Today I realised that in using my gnuplot output to study system >> performance I am constantly needing to read x,y values off the graph. >> This currently means zooming to a large magnification, placing the mouse >> cursor and then scrolling with arrow keys and praying that it falls near >> enought to the axis to read the minor ticks near the cursor. >> >> In short rather unsatisfactory and hacky. >> >> What I need is something like the wxt terminal cursor output. >> >> How feasible would it be to add an onhover or onclick event and grab >> the event x,y and display plot related x,y values? > > It should be feasible. I have been trying to drum up enthusiasm for this, > and find a volunteer to code it. > >> That sounds like it would be fraught with browser compatibility issues. > > To some extent. But there are working example of cross-platform code that > uses javascript to do mouse-tracking. Here is one: > http://dunnbypaul.net/js_mouse/ > > As I see it, we need to put the following in place: > > - create a jscript/ECMScript/javascript/whatever mouse-tracker, which > can be loaded from either the user's own web site or from some > central place like the gnuplot pages on SourceForge. It should > read the current mouse coords, apply a transformation matrix (see next) > and print the transformed coordinates on the page, similar to the > current interactive terminals. Hi Ethan, maybe I'm missing the point but can't the javascript be included in the SVG xml? I don't see it as desirable solution to wait for a response from sourceforge before my plot can fully render, nor that I need an open internet connection to diplay a local file. Externalising what could potentially be common and invariant code may be an option but I would have thought the first aim should be a self contained svg file. regards, Peter. > > - have the svg driver emit code that refers to the script by its URL, > and initializes the coordinate system to correspond to the one in > the current plot by providing an appropriate transformation matrix. > > There may be other ways to do it. I am intrigued by the "canvas terminal > driver" uploaded to SourceForge as patch #2056054 > > |