I am using version 5.0.3 and I am honestly not sure if this should be a bug or a feature request.
We can use characters as pointtypes using syntax like pt "A". Now suppose that I wish to plot with linespoints and use a symbol like this.
The following version works (where linetype 1 has the default color 'dark-violet')
plot datafile with linespoints pt "A"
but the symbol color does not match the line color as we need to set it with text color instead. The following variant works
plot datafile with linespoints pt "A" tc rgb 'dark-violet'
Now, if we redefine the line type
set linetype 1 pt "A"
and then plot, the following also works
plot datafile with linespoints lt 1 tc rgb 'dark-violet'
However, the following creates an error (where we have defined lt 1 as previously)
plot datafile with linespoints tc rgb 'dark-violet'
stating unexpected or unrecognized token and pointing to the 'tc', even though linetype 1 is the one used by default here. Attempting to set the text color on the linetype with
set linetype 1 pt "A" tc rgb 'dark-violet'
also causes an error, Extraneous arguments to set linetype, also pointing to the tc.
Overall, this is probably because there is no text color associated with a linetype. Because of these use cases, I think that linetypes should accept text colors that would be used in these cases (and ignored when the pointtype is a numbered type). It seems undesireable to have to specify the point symbol in every plot command, and even having to specify the linetype defeats the purpose of having an automatic cycle.
If this can be done, it would also be nice to have a keyword that specifies that the text color should be the same as the line color
set linetype 1 pt "A" lc rgb 'dark-violet' tc inherit
This would allow us to simply recolor the text and line for the linetype with
set linetype 1 lc rgb 'orange'
knowing that the textcolor would pick up this change.
Or, if that isn't possible, at the very least using the linecolor as the textcolor would be better. As it is, it seems inconsistant that plot ... w linespoints pt 1 draws dark-violet points but plot ... w linespoints pt "A" suddenly draws black As.
Whee! Several issues here.
First - I agree it is a bug that putting "tc rgb whatever" in the plot command works if there is an explicit pointtype in the same command but not if the pointtype is picked up from some default setting. I think that is an oversight that can be fixed easily.
Note that this bug affects all text propertes (font, size, bold, italic, ...) that are applied to the character being used as a point symbol, not just the color. These really are text properties, not linetype properties, and do not belong in the linetype definition.
There is another more subtle reason why you don't want to tie the point properties too tightly to a linetype definition. If you do not put any explicit linetype or pointtype in the plot command, then they default to sequence order lt1 lt2 l3 ... and pt1 pt2 pt3 ... But pt N is not necessarily the same as the pointtype associated with lt N, they just happen to be marching in parallel at the start. This is important because it means the repeat cycle of distinct elements in a plot "with linespoints" can be much larger than either the number of linetypes or the number of pointtypes.
For example: The program defaults to a cycle of 8 linetypes and 15 pointtypes. These are mutually prime numbers, so there are 120 distinct combinations used by 'with linespoints' before the first one comes up again. If the pointtype were always taken from the linetype then you'd only get 8 distinct combinations by default. [OK, you could still define 120 explicit linetypes if you really wanted to, but that would be a lot of work just to get back to what we already get for free by default]
Anyhow - I'll look into fixing the bug.
Ok, I just assumed that the points were tied to the lines because point types can be set on linetypes with
set linetype 1 pt "A"and additionally,show linetypeshows pointtypes on each line, but I see your point on why they aren't really tied together. I was aware that there was a longer cycle of points than lines, but for some reason, it just didn't click for me that they aren't really tied together. So, I agree that request should be stricken.Thank you for fixing this bug when an explicit point type is not specified.
Now, lastly, I still think that the default textcolor should be taken from the line color. It still seems inconsistant that the command
plot ... w linespointsproduces line connected points where both the points and lines are the same color, butplot ... w linespoints pt "A"produces line connected points (the points are As) where the points and lines are different colors. The same happens when we doset linetype 1 pt "A"and thenplot ... w linespoints. It seems that it should use the same color for the lines and text based points unless an explicit text color is specified, in order to remain consistant. I understand why the behavior is different, but it still is inconsistant. I'm not sure how difficult this would be to impliment, however.If this can't be done for some reason, at very least the documentation should reflect the different behaviors in this case. Where the documentation (for the points style) says Alternatively any single printable character may be given instead of a point type, as in the example below, it should maybe say something like Alternatively any single printable character may be given instead of a point type, as in the example below, but the color of the points must be explicity given in the plot command as a textcolor.
Last edit: Matthew Halverson 2016-03-16