|
From: <pl...@pi...> - 2008-12-21 16:49:49
|
Ethan A Merritt wrote: > On Sunday 14 December 2008, Bill Broadley wrote: >> I've been generating some plots that get a bit busy, sometimes it's nice to be >> able to toggle what you see. So I wrote a script to tweak the gnuplot output, >> and it generates: >> http://cse.ucdavis.edu/bill/barc.svg >> >> Try clicking on any of key titles like "1-thread add". Currently it's a short >> perl script. The changes are just things like adding a >> onclick=ToggleVisibilty call for each key text entry, adding a id= group for >> each line in the graph, and of course the small routine to actually toggle the >> visibility. >> >> Any comments on how hard it would be to add to the gnuplot SVG output routine? >> How useful? >> Would a reasonably written patch to do this be accepted? > > That's very nice. > > Please have a look at the patchset #2172587 "Embedded hyperlinks" > https://sourceforge.net/tracker/index.php?func=detail&aid=2172587&group_id=2055&atid=302055 > > That patchset contains an extension to the svg terminal driver that does > something parallel to your idea. It wraps each plot (and key entry) in > a group with an attached xlink hyperref. > > It may be that you could re-use much of that code. > It may also be that you can see a cleaner way to do it, or better yet > propose an extension that handles both uses via the same mechanism. > > As to the associated routine that does the toggling, here also I would > very much encourage brainstorming about how this could be made as > general as possible. My long-term vision for the svg terminal > (a goal that I keep trying to hand off to someone else :-) > is to provide all the necessary infrastructure for a set of associated > scripts to carry out client-side mousing operations like the existing > interactive terminals. I had been thinking mostly of mouse-tracking and > zoom, but your example makes me realize that other operations like > toggling the grid or ruler bars are even easier. > Hi, 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? That sounds like it would be fraught with browser compatibility issues. Is there a more suitable means of picking up the plot coords of a click? Thanks, Peter. |