Menu

#1995 circle line colors wrong in SVG output

None
closed-fixed
nobody
None
2018-04-28
2017-12-04
Anonymous
No
set terminal svg enhanced size 600,480
set output 'bug.svg'
set yrange [0:30]
set xrange [0:10]
# draw a backgroud rectangle, so we can see white objects better:
set style rect fc lt -1 fs solid 0.7 noborder
set object rectangle from 0,0.0002 to 24,500 fc rgb "#a0a0a0" behind
# draw two circles with line type 1, 2:
set object circle at 3,10 radius 0.2 fillstyle border lt 1
set object circle at 3,20 radius 0.2 fillstyle border lt 2
# draw two more circles, all with line type 2:
set object circle at 7,10 radius 0.2 fillstyle border lt 2
set object circle at 7,20 radius 0.2 fillstyle border lt 2
# plot something out of bounds:
plot -10 notitle

The above Gnuplot script produces wrong output. It shows that a sequence of circles is not drawn in the specified line type: all but the first are drawn in white. This behavior appears to be specific to the SVG output.
I'm using gnuplot 5.2 patchlevel 2 on Linux/x86-64 (the package from Debian/testing, in fact).

Discussion

  • Ethan Merritt

    Ethan Merritt - 2017-12-05

    The bug actually affects all terminals, although in most cases the effect is more subtle than what you see here. Each polygon should be a separate path. Otherwise line properties are not properly set or reset before starting a new polygon. Also the start/end "cap" property of the boundary line is not handled properly. Fixed now.

     
  • Ethan Merritt

    Ethan Merritt - 2017-12-05
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2018-04-28
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.