|
From: Benjamin L. <lin...@gm...> - 2009-08-31 18:26:32
|
Hello list,
I came across a (for me) strange behaviour, which is, that if you use
the "labels" plotstyle increases the linestyle, although no line is drawn.
I am using a 4.3.0 CVS snapshot version.
Test case:
set style data linespoints
set style line 1 lt 1 lc rgb "red"
set style line 2 lt 1 lc rgb "green"
set style line 3 lt 1 lc rgb "blue"
set label 1 "lines should be red and green" at graph 0.5, 0.9
set style increment user
plot '-' u 0:1, '-' u 0:1:1 with labels offset character 0,1,0 , '-' u 0:1
1
2
3
4
5
e
1
2
3
4
5
e
2
3
4
5
6
e
I would expect the lines to have color red and green, not red and blue.
I looked at the source code in src/plot2d.c and found that for certain
plotstyles this increase of the line style is disabled. However, not for
the "labels" plotstyle.
Is this deliberate?
May I suggest the following change:
diff -r d67b4d3fbb86 src/plot2d.c
--- a/src/plot2d.c Mon Aug 31 09:08:58 2009 +0200
+++ b/src/plot2d.c Mon Aug 31 09:09:17 2009 +0200
@@ -1975,8 +1975,9 @@
&& this_plot->plot_style != IMAGE
&& this_plot->plot_style != RGBIMAGE
&& this_plot->plot_style != RGBA_IMAGE
+ && this_plot->plot_style != LABELPOINTS
/* don't increment the default line/point properties if
- * this_plot is an image */
+ * this_plot is an image or labels plot */
) {
if (this_plot->plot_style & PLOT_STYLE_HAS_POINT)
++point_num;
benjamin
|