|
From: <pl...@pi...> - 2011-10-21 05:15:00
|
On 10/21/11 02:59, Ethan A Merritt wrote:
> On Thursday, October 20, 2011 03:34:51 pm pl...@pi... wrote:
>
>> I really don't see why the needs of the demo script should have any
>> impact on how the program functions.
>
> My point was that I really don't know how the "typical user" operates.
> The only experience I have to work from is my own, and my use has been
> script-driven generation of web pages. I only mentioned the demo set
> because that is an example everyone has access to, not because it has
> any particular importance on its own.
>
>> The svg file is an automonmous file format , I would have thought the
>> viewing it in an svg viewer would have been the reference condition.
>
> Maybe for some users it is. So far everyone I've heard from has been
> generating svg plots explicitly to embed them in some larger document.
>
My initial use of svg was just that , embedding svg on an embedded system.
I have recently found that the combination of zoom, mouse coords and
visibility toggle in svg makes it more useful than wxt for close
inspection of detailed graphs.
I have taken to transmitting plots as svg by email and recommending
Firefox as viewer.
That way the other end benefits from all these features as well. That is
a huge plus and I thank you for all your work in adding svg output.
In this context the title is quite visible and underlines look a bit
untidy. Hence my interest in getting a more presentable title displayed
by the browser.
>> Why would anyone want to set the id , js_id or jsname at all ?
>
> I have been trying to explain that. If you are creating dynamic content
> from a script, the script needs to create an svg (or HTML5 canvas) plot with
> named tags, and then also create javascript code that acts on those named
> tags. So it needs to specify a non-redundant name for each plot, and that
> name must be legal in both xml and javascript. If gnuplot changes the
> requested name to something else, it breaks the connection between the
> plot and the associated javascript.
>
OK , you clearly see a need for it and having that possibility cannot be
bad.
I would imagine that someone working at that level must be aware of the
language requirements so probably the most useful thing would be for
this to be clearly documented.
It seems at the moment all the user has on this is the entry in the
syntax definition:
{name <plotname>} , so a short para in the detailed description would
be valuable.
To avoid confusion in introducing more terms I suggest "name" becomes
"title" and sets the svg title. The svg id , as you suggest, could be
done by a new argument. I would suggest "id" or js_id" if you want to
underline the javascript link here.
I'll anticipate your asking me to suggest what that text might be:
>>
The 'js_id' option is used by the interactive mouse features and must be
a valid javascript variable name. In short, this means it cannot
contains certain characters like spaces and punctuation marks. An error
will be produced when the graph is plotted if this is not a valid name.
If not specified it will be 'gnuplot_plot_n' , where n is 1 for a simple
plot but may be greater than one in the case of multiplot output.
The 'title' option sets the svg <title> element that is displayed by
some svg viewers in the title bar. It is not visible in the plot itself.
If not supplied it will be the same as 'js_id' value.
>>
>>>> I don't see right away where you could have multiple plots without an
>>>> HTML wrapper
>>
>>> Christoph points out that the current scheme doesn't deal well with
>>> multiplot mode. All the plots in a multiplot get the same name.
>>
>> See my reply to Christoph, they don't get the same value, one is wrong.
>> I found what looks like a simple slip up in the source.
>
> I think you are misinterpreting something. Try running "multiplt.dem"
> in the demo set. Each of the 4 graphs in the resulting svg file contains
> plots named "multiplt_plot_1", "multiplot_plot_2", and so on.
> So we end up with 4 copies of each, which is a problem.
>
> The "gnuplot_canvas" identifier is attached to the top-level group that
> bounds the whole document so that the mousing code can find it.
> Its name is purely arbitrary and has nothing to do with any of the
> individual plots.
>
> Ethan
>
Sorry, I thought I had spotted a simple slip up. I have not looked
closely at this , I'll shut up on this issue. ;)
Thanks again for svg mouse interactivity. This makes svg an ideal format
for lab work and for collaborating with others remotely where they get
the same (better) interactivity than I am used to in wxt.
regards, Peter.
|