|
From: <pl...@pi...> - 2011-10-19 22:57:17
|
On 10/20/11 00:41, pl...@pi... wrote:
> On 10/19/11 23:53, Ethan Merritt wrote:
>> On Wednesday, October 19, 2011 02:03:54 pm pl...@pi... wrote:
>>> Hi,
>>>
>>> unless I've missed something in help there does not seem any way to set
>>> the svg<title> when using that terminal.
>>>
>>> All plots get :
>>>
>>> <g id="gnuplot_plot_1"><title>gnuplot_plot_1</title>
>>>
>>>
>>> When I open several plots in a viewer (eg firefox) seeing them all named
>>> gnuplot_plot_1 is not too helpful.
>>>
>>> I thought of using the gnuplot title here but since plot titles tend to
>>> be rather verbose , this may not be the best idea.
>>>
>>> Since this is fairly specific to svg , maybe a better idea is to add it
>>> to the terminal setting syntax:
>>>
>>>
>>> Syntax:
>>> set terminal svg {size<x>,<y> {|fixed|dynamic}}
>>> {{no}enhanced}
>>> {fname "<font>"} {fsize<fontsize>}
>>> {mouse} {jsdir<dirname>} {name<plotname>}
>> ^^^^^^^^^^^^^^^^^
>>> {font "<fontname>{,<fontsize>}"}
>>> {fontfile<filename>}
>>> {rounded|butt} {solid|dashed} {linewidth<lw>}
>>> {background<rgb_color>}
>>
>> It's in there already:
>> set term svg name "myplot"
>>
>> This is exactly the mechanism used to generate the demo pages
>> so that you can toggle the curves in one plot on/off without
>> affecting curves in other plots on the same page.
>> E.g.
>> http://gnuplot.sourceforge.net/demo_svg_4.5/simple.html
>>
>>
>> Ethan
>>
> Apologies Ethan,
> maybe I could only see what is was expecting to see and didn't realise
> name was what I wanted.
>
> Since I raised the topic , there are two things there the id and the
> title, name gets used for both.
>
> Clearly id cannot have spaces so attempting a name with a space throws
> an error, though
> " line 133: illegal javascript variable name" is a bit cryptic unless
> one is familiar with the mechanics of svg.
>
> A title with underscores, though legible, is not too pretty. Would it be
> better to substitute spaces with underscores internally when composing
> the id and allow spaces in name, and hence the visible title?
>
> Thanks.
>
PS I've just noticed that even when I do specify a name , the svg title
still gets "plot_1" appended to the name I specified.
Is this necessary in some way , or is it an oversight?
regards, Peter.
|