Hi,
the behaviour of lc variable and tc variable is inconsistent, the documentation says:
lc variable tells the program to use the value read from one column of the input data as a linetype index, and use the color belonging to that linetype. This requires a corresponding additional column in the using specifier. Text colors can be set similarly using tc variable.
Now, tc variable always uses a linetype, while lc variable uses a linestyle, if avaible, and the linetype otherwise.
Consider the following example. In the upper plot, both points and labels use the respective linetype. In the lower plot, after defining some linestyles, the points use the linestyles, and the labels still use the linetype:
$db <<EOF
first 1
second 2
third 3
EOF
set offsets 0.5,0.5,0.5,0.5
unset key
set multiplot layout 2,1
plot $db using 2:2:2 with points pt 7 lc variable,\
$db using 2:2:1:2 with labels offset -1,1 tc variable
set style line 1 lc rgb "aquamarine"
set style line 2 lc rgb "coral"
set style line 3 lc rgb "#eeee00"
replot
unset multiplot
Should tc variable also use the line styles? Or is lc variable buggy and should not use the linestyle? Or should the documentation be adapted accordingly?
I attach the output of the above script, as produced using the current CVS version.
Thanks,
Christoph
lc variable should increment over line types, as documented, unless the option "set style increment user" is selected. The relevant line of code somehow went missing during pre-4.6 code reorganization. Fixed now in CVS for 4.6 and 4.7
Thanks! Do you think it make sense to have
textcolor variablealso respect the settings ofset style increment userin order to be consistent withlinecolor variable?I tried to figure out, how to apply that in the code, but I guess it would take quite long...
Yes, good point.
I have made that change in store_label() for both 4.6 and 4.7
Almost done... It is still missing for the
pointflag of thelabelsplotting style. See the following script for testing:For this, finally, I could fix it myself. Thanks to diffing your previous changes :-)
Christoph