|
From: David K. <da...@gn...> - 2017-10-17 13:39:17
|
Ethan A Merritt <eam...@gm...> writes:
> On Sunday, 15 October 2017 10:53:08 Ethan A Merritt wrote:
>> On Sunday, 15 October 2017 13:06:50 David Kastrup wrote:
>> >
>> > So I now tried compiling 5.2.0.
>> >
>> > No change in the epslatex terminal: it would appear that _only_ the
>> > linewidth and the dash pattern for linestyle 1 are ever consulted and
>> > are used for _all_ lines. Linecolor can be changed per line style, but
>> > pretty much nothing else.
>>
>> Correct. It steps through sequential line colors.
>>
>> > Anybody have a good idea for where to patch this up?
>>
>> The following 1-line change might or might not produce acceptable
>> results for you. One problem is that the line segments making up
>> a contour are not necessarily drawn in order and some terminals
>> reset the dash pattern for each segment, leading to mostly solid
>> or mostly missing lines rather than the desired dash pattern.
>> For other terminal types this doesn't seem to be a problem.
>>
>> If this does work for you please report back.
>> We could make it an optional setting of some sort.
I don't think following the documentation is "optional".
>From help set cntrlabel:
A contour label is placed in the plot key for each linetype used. By default
each contour level is given its own linetype, so a separate label appears for
each. The command `set cntrlabel onecolor` causes all contours to be drawn
using the same linetype, so only one label appears in the plot key.
This command replaces an older command `unset clabel`.
>From help set linetype:
The `set linetype` command allows you to redefine the basic linetypes used
for plots. The command options are identical to those for "set style line".
Unlike line styles, redefinitions by `set linetype` are persistent; they
are not affected by `reset`.
>From help set style line:
Each terminal has a default set of line and point types, which can be seen
by using the command `test`. `set style line` defines a set of line types
and widths and point types and sizes so that you can refer to them later by
an index instead of repeating all the information at each invocation.
Syntax:
set style line <index> default
set style line <index> {{linetype | lt} <line_type> | <colorspec>}
{{linecolor | lc} <colorspec>}
{{linewidth | lw} <line_width>}
{{pointtype | pt} <point_type>}
{{pointsize | ps} <point_size>}
{{pointinterval | pi} <interval>}
{{pointnumber | pn} <max_symbols>}
{{dashtype | dt} <dashtype>}
{palette}
unset style line
show style line
`default` sets all line style parameters to those of the linetype with
that same index.
>From help dashtype:
In gnuplot version 5 the dash pattern (`dashtype`) is a separate property
associated with each line, analogous to `linecolor` or `linewidth`. It is not
necessary to place the current terminal in a special mode just to draw dashed
lines. I.e. the command `set term <termname> {solid|dashed}` is now ignored.
If backwards compatibility with old scripts written for version 4 is required,
the following lines can be used instead:
if (GPVAL_VERSION >= 5.0) set for [i=1:9] linetype i dashtype i
if (GPVAL_VERSION < 5.0) set termoption dashed
All lines have the property `dashtype solid` unless you specify otherwise.
You can change the default for a particular linetype using the command
`set linetype` so that it affects all subsequent commands, or you can include
the desired dashtype as part of the `plot` or other command.
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> --- gnuplot52/src/graph3d.c 2017-09-15 20:26:48.393406844 -0700
>> +++ test52/src/graph3d.c 2017-10-15 10:50:39.698779538 -0700
>> @@ -1265,6 +1265,8 @@ do_3dplot(
>> /* otherwise the following would be sufficient */
>> load_linetype(&ls, this_plot->hidden3d_top_linetype + ic);
>> }
>> +/* DEBUG */ /* increment dashtype also */
>> +/* DEBUG */ thiscontour_lp_properties.d_type = ic;
>
> probably better as
>
> +/* DEBUG */ thiscontour_lp_properties.d_type = ls.d_type;
I can now set individual dash types. The individual linewidths still do
not seem to get consulted for the contour lines: it seems like the
linewidth of line style 1 is applied everywhere.
--
David Kastrup
|