|
From: Ethan A M. <merritt@u.washington.edu> - 2007-12-08 21:55:44
|
On Saturday 08 December 2007 00:46, Petr Mikulik wrote:
> >
> > The default has been that way since at least version 3.7
> > The relevant X resource is:
> >
> > gnuplot*borderWidth: 2
>
> Looking to the source code ([bB]order[wW]idth] appears in gplt_x11.c,
> x11.trm and be.trm), I wonder how this option is implemented... I don't see
> that it sets any global variable in the gnuplot core.
Not in the core. All the XResource interpretation is done in gnuplot_x11.
The routine that manages linewidths is pr_width().
> Further it seems that this is actually a multiplicate constant, not a line
> width in pixels as "help x11 line" describes. Is this right?
Yes, that has always annoyed me. But if you set all the XResource linewidths
to 1.0, then the multiplicative constant is effectively the true linewidth.
So most people probably don't notice.
I would be in favor changing it so that
'set term x11; plot foo lt 3 lw 5'
really does use a linewidth of 5 pixels rather than using
(5 * getR(db,"linewidth3"))
> Additionally, this indicates:
>
> src/gplt_x11.c: {"-borderwidth", ".borderwidth", XrmoptionSepArg,
> (XPointer) NULL},
> src/gplt_x11.c: {"-bw", ".borderwidth", XrmoptionSepArg, (XPointer)
> NULL},
>
> that
> gnuplot -bw 5
> would set the default border to the number indicated, but it does nothing.
That seems to be a typo. The lines should read (note capitalization)
{"-borderwidth", ".borderWidth", XrmoptionSepArg, (XPointer) NULL},
{"-bw", ".borderWidth", XrmoptionSepArg, (XPointer) NULL},
> Further, there are
> { "-iconic", hasNoArg}, { "-rv", hasNoArg},
> { "-selectionTimeout", hasArg},
> { "-name", hasArg},
> and other potential command line options which are not documented
> in "help x11 line".
Aren't these generic X11 resource names that have nothing in
particular to do with gnuplot? The docs say:
For terminal type `x11`, `gnuplot` accepts (when initialized) the standard
X Toolkit options and resources such as geometry, font, and name from the
command line arguments or a configuration file. See the X(1) man page
(or its equivalent) for a description of such options.
For example:
gnuplot -bg #AAAAAA -geometry 250x250 -iconic
works as expected without requiring any special code in gnuplot_x11.
--
Ethan A Merritt
|