|
From: <pl...@pi...> - 2011-10-22 07:08:48
|
On 10/21/11 20:55, Ethan A Merritt wrote: > On Friday, October 21, 2011 01:14:52 am Christoph Bersch wrote: >> according to the standard it is up to the viewer to decide how to >> handle the 'title' elements: >> <http://www.w3.org/TR/2000/CR-SVG-20001102/struct.html#DescriptionAndTitleElements> >> >> Firefox seems to show the first element in the title bar, regardless of >> where it was specified (the plot titles are inside groups), but Opera >> uses only a title element which is placed in the top level of the >> document structure: >> >> <?xml version="1.0" encoding="UTF-8" standalone="no" ?> >> <svg width="200" height="200" >> xmlns="http://www.w3.org/2000/svg" >> xmlns:xlink="http://www.w3.org/1999/xlink"> >> <title>The SVG title</title> >> <rect x="5" y="5" width="190" height="190" /> >> </svg> >> >> So, writing the<title> next to the<desc> works fine. >> >> Christoph > > Thanks. Sounds good. Yes, that seems clearly the correct location for the document title tag. > Do people agree that the logical thing to put here would be the > title of the overall graph - the one controlled by "set title ..."? Not really. The gnuplot title would typically be too verbose. eg "correlation of spectral FWHM to instrument slit width." , or some such. Graph titles are generally quite descriptive. Graph titles have to say quite a lot. This may be far too long to be useful in a tab title (often cropped off at a dozen or so characters,or the window title bar text which is usually length limited as well. Using the current name option would be preferable to make these two the same. What I find useful as a distinct label in the browser is often some snippet of the full title that allows me to differentiate between several plot versions displayed concurrently. eg. gnuplot title for graph: "As_193.7nm_HIB1365_50u50u_DC2.SD_fit" svg name "50u50u_DC2.SD_fit" It is the 50u50u_DC2 that I need to see to differentiate concurrently displayed plots. They all start with "As_193.7nm" as dictated by the title required on the report's SVG output. I think confounding the two would be a retrograde step/ > > The text of "set title" is not currently visible to the drivers, though. > One possibility is to add a new terminal entry point > term->title(const char *text) > I do not know off the top of my head how many terminal types would > benefit, but it seems likely we could use it at least for svg, canvas, > PostScript, and pdf. > > Ethan > Your earlier suggestion of having this as a separate option in 'set terminal svg ..." seemed good. If this can really be useful to several terminals a global approach may have some merit and making it visible to the driver would make sense. What is passed, however, would be subject to comments above. Are the uses made of title by the other terminals functionally similar (eg space limitations and cropping ) such that forcing identical formatting makes sense? In my context, the true graph title has very different criteria to what is useful in the browser tab and title bar to identify what I'm looking at , which does not need to be verbose but needs to be short and unique. Similarity of name ; svg "title" and gnuplot "title" , should not be assumed to be a similarity of function. I think the two have very different requirements. My bottom line suggestion: gnuplot title is part of the final , terminal agnostic (possibly printable) output. This is truly part of the graph and can not be compromised by the user to fit in with something else. It is not necessarily a good choice for other uses. In fact, probably isn't. set terminal svg name <svg title> changes to : ... svg title <svg title> to avoid potentially confusing alternative names for same thing. This will generally be much shorter than gnuplot's: set title <visible plot title> . Help should explain that this is the document title and that it does no appear in the graph. If specified, that svg title would also be the base text for <g> titles on the plot lines as well. (though not the id's) new "id" or "js_id" option for svg and canvas that, when given, is the base for variable names with all that implies. If not given revert to current "gnuplot_1_x " syndrome with any needed bug fixes. None of that should affect the namespace changes suggested elsewhere if that done later. best regards, Peter. |