I could use x,y,magnitude to make the plot and the name of a particular
point would be visible by hovering the mouse over it.
I'm absolutely open to terminal type (perhaps html or similar?) since my
main purpose is to glean max. info from my dataset. Any sugesstions?
--
Rahul
2D plot - maybe.
3D plot - no.
What do you mean by the "name" of the point?
Is that the same as the "magnitude", or is it something else?
>I'm absolutely open to terminal type (perhaps html or similar?) since my
>main purpose is to glean max. info from my dataset. Any sugesstions?
A possible starting point is this demo using the SVG driver (cvs version only):
http://skuld.bmsc.washington.edu/people/merritt/gnuplot/
Exactly what you see on mouse-over depends on your web browser.
Firefox shows a test label; Konqueror shows only an icon.
Either way the data point (or histogram bar in this case) is a live link
back to the original data.
The eventual goal for the SVG driver is to make it easy to generate jscript
or other browser-side viewing options that are synced to the plot coordinates.
If you want to explore this, but find some bit of necessary information is
missing from the gnuplot output, please file a "feature request" via the
SourceForge site and/or start a discussion on the development list.
--
Ethan A Merritt
>
> What do you mean by the "name" of the point?
> Is that the same as the "magnitude", or is it something else?
Thanks Ethan. No, not the magnitude. Example:
12, 23.4, 25, CuCl2
13.4,25.2,30, FeSO4
I aim to use it as
x,y,magnitude, name
I'll vary the pointsize or color by the magnitude. Just let's me add
additional dimensionality to the graph. I'd like to see "CuCl2" as a
tooltip when I hover the mouse above 12,23.4
> The eventual goal for the SVG driver is to make it easy to generate
> jscript or other browser-side viewing options that are synced to the
> plot coordinates.
Very good idea. The closest I know now is the SIMILIE-Exhibit project at
MIT.
If you want to explore this, but find some bit of
> necessary information is missing from the gnuplot output, please file
> a "feature request" via the SourceForge site and/or start a discussion
> on the development list.
I'll sure give that a shot.
--
Rahul
Huh. That is intriguing. I think it would be very easy to generate
such an SVG output. The bigger issue is how to fit this in with other
terminal types and existing gnuplot command structures.
Two completely difference approaches come to mind, neither to be taken
as more than random musing at this point.
There could be a "plot with hyperlink" style, to be used in parallel
with whatever the visible plot style is:
plot 'data' using 1:2 with points, '' using 1:2:3 with hyperlink
where the data looks like
xcoord ycoord "<hyperlink text>"
There could be a pseudo-font, or an extra text property, that becomes
part of every gnuplot string. If this font or property is set, then
xml-capable terminals (pdf, svg, and maybe the latex variants)
could create an xml element in parallel to whatever else the string
is used for:
plot 'data' using 1:2:3 with labels {xml {format "title=\"%s\""}}
Or that same sort of xml markup could be made a terminal option
specific to SVG:
set term svg {textmarkup {format "<a xlink:title=\"%s\"\\>"}}
plot 'data' using 1:2:3 with labels point pt 7 font ",0"
--
Ethan A Merritt
>
> Huh. That is intriguing. I think it would be very easy to generate
> such an SVG output. The bigger issue is how to fit this in with other
> terminal types and existing gnuplot command structures.
> Two completely difference approaches come to mind, neither to be taken
> as more than random musing at this point.
> There could be a "plot with hyperlink" style, to be used in parallel
> with whatever the visible plot style is:
> plot 'data' using 1:2 with points, '' using 1:2:3 with hyperlink
> where the data looks like
> xcoord ycoord "<hyperlink text>"
To my novice mind the first form seems more intutive. If I saw both in a
manual I'd be more likely to use the former. :)
Another random thought: The hyperlink is great functionality but for
starters I could twist it to just add more "plain-text" info. just to add
an additional dimension to a humble scatter plot.
--
Rahul
>
> A possible starting point is this demo using the SVG driver (cvs
> version only):
>
> http://skuld.bmsc.washington.edu/people/merritt/gnuplot/
>
Ethan, I got the latest CVS devel version installed now. Is there any
documentatio how to generate a scatter plot in svg with those tool-tips? I
am lost. What is the syntax:
plot "data" using 1:2:3 with ???
Any leads to the relevant documentation?
--
Rahul
No. You are the first one to try :-)
The potential for this kind of use came as a welcome side-effect of
a more general change. The demo above was my own quick attempt to use
it for something specific.
In svg output from gnuplot's CVS version, each plot is wrapped by
xml tags:
<a xlink:title="Plot #NN">
... all the commands that actually draw the plot ...
</a>
Here "plot" means one clause of the plot command, and NN counts out which
clause it is. That means if you say
plot sin(x),cos(x)
the svg output looks like this
<a xlink:title="Plot #1">
... all the pieces of the sin(x) representation ...
</a>
<a xlink:title="Plot #2">
... all the pieces of the cos(x) representation ...
</a>
Your browser can choose what it does with the xml markup, but at least
Firefox will use it to pop up a "tooltip" as you are calling it whenever
the mouse is over one of the component elements of the sin(x) or cos(x),
including their respective titles.
For my demo plot I manually supplemented this by editing the output svg
file so that it also contained a hyperlink in that same markup:
<a xlink:title="Plot #1" xlink:href="Some URL">
Now you get not only the mouse-over pop-up, but also an active link if you
click the mouse. Even in the current rudimentary implementation you could
automate that post-processing step using a script. More polished options
exist only as random musing at this point. My current thought is that is
one could associate individual points with individual URLs by pulling the
URLs from the data file using a syntax something like the current
xticlabels() syntax:
plot foo using 1:2:url($3) with boxes
The reason for not implementing this via a separate plot clause, e.g.
plot foo using 1:2 with points, '' using 1:2:3 with url
is that the latter mechanism would only get you a clickable spot at some
small radius around the specific (x,y) coordinate. By making the url
part of the main plot clause, the entire plot element (box in this case)
would be clickable. But this is all musing so far; no actual code.
>I am lost. What is the syntax:
>
>plot "data" using 1:2:3 with ???
That was just to indicate that it works for any plot style.
If you say "plot 'data' with points" then you can hover the mouse
over the points; if you say "plot 'data' with boxes" then you can
hover over the boxes.
--
Ethan A Merritt
>
> No. You are the first one to try :-)
Ah! I didn't realize that! :)
>
> Now you get not only the mouse-over pop-up, but also an active link if
> you click the mouse.
Right, I got till that stage. And I do use Firefox. I have a "Plot #1"
tooltip already. So far so good.
Next stage is to get a tooltip to associate with each point. I tried going
through the svg output but was overwhelmed!
>
> plot foo using 1:2:url($3) with boxes
>
That would be a nice way out for me once implimented.
--
Rahul