|
From: Daniel J S. <dan...@ie...> - 2016-07-11 20:08:59
|
On 07/08/2016 11:08 PM, Daniel J Sebald wrote: > On 07/08/2016 04:23 PM, Ethan A Merritt wrote: >> On Friday, 08 July, 2016 15:17:25 Daniel J Sebald wrote: >>> The documentation for key indicates: >>> >>> The defaults for `set key` are `on`, `right`, `top`, `vertical`, `Right`, >>> `noreverse`, `noinvert`, `samplen 4`, `spacing 1.25`, `title ""`, and >>> `nobox`. The default <linetype> is the same as that used for the plot >>> borders. Entering `set key default` returns the key to its default >>> configuration. >>> >>> and when I do the following: >>> >>> gnuplot> plot x, -x >>> gnuplot> show key >>> >>> key is ON, position: top right vertical inside >>> key is right justified, not reversed, not inverted, enhanced and not boxed >>> sample length is 4 characters >>> vertical spacing is 1 characters >>> width adjustment is 0 characters >>> height adjustment is 0 characters >>> curves are automatically titled with filename >>> maximum number of columns is calculated automatically >>> maximum number of rows is calculated automatically >>> >>> key title is "" >>> >>> The vertical spacing says 1 character, not 1.25. Mistake? Change in >>> code without change in documentation? >> >> The default vertical spacing is 1 * (1.25 characters) > > That's 1.25 characters. The printout from show key indicates 1 > characters. The lack of consistency is > > default value in character units > ------- ------------------------ > `samplen 4` => 'sample length is 4 characters' > `spacing 1.25` => 'vertical spacing is 1 characters' > > If the printout indicated 'vertical space is 1', i.e., unitless, then it > could be a scale factor. But then it would make sense that samplen > should be a scale factor as well. Something else that comes to mind looking at the key is that it would be nice if there were a more object-oriented approach to its design. That is, one can look at the key as a being a subplot, but with more keywords to aid its layout. That is, if one viewed a key as a plot, all of the methods for laying out a plot would apply, e.g., the line type control, the fill/patch control, the sizing control, etc. Right now it looks like only character sizes can be used to control a sample length, e.g., "set key samplen 5" where 5 refers to characters. I assume that means character widths. Does character width units change with a change in font? How about if someone specified the size of the key and then wanted to use relative units? For example, "set key samplen graph 0.3" might do. The point is to try and use existing code, which also aids the user's understanding of how things work. Dan |