Plots.jl: Plots 0.13.1 linestyles do not work properly

Created on 6 Oct 2017  路  6Comments  路  Source: JuliaPlots/Plots.jl

Julia sample code:

using Plots; gr()
x = 0:0.01:3
y1 = sin(2蟺.x).exp.(-x)
y2 = 0.6y1; y3 = 0.3y1
plot([x x x], [y1 y2 y3], ls=[:dash :dashdot :dashdotdot], lw=2)

sample.pdf

All 6 comments

I can reproduce. I think it's from a relatively recent change.

This:
screen shot 2017-10-06 at 12 35 27 pm

Was this before my latest Pkg.update:
screen shot 2017-10-06 at 12 36 05 pm

Thats correct, change commes from latest update.

previos plot
jlsc_Ident_pade01.pdf

new plot
jlsc_Ident_pade01.pdf

if you print (b&w) the new plot you can not know what lines is each one

Also, this is specific to GR.

@daschw I think I found the commit which introduced this: https://github.com/JuliaPlots/Plots.jl/commit/5f8486536561746b73823065ac033896ed220082, but I'm not sure where to look to diagnose it further.

Thanks a lot guys for reporting and investigating this!
This was indeed my fault. With the above commit each line segment is drawn individually (in order to be able to have differently colored line segments with the line_z attribute). Thus, the line styles get hidden if the segments are too short. That's why steeper parts work "better" than flat parts.
I will try to fix this tomorrow!

I'm not sure yet, if I should deactivate multi-colored lines for GR again or if we should accept this linestyle issue if series[:line_z] is a vector.

@daschw I strongly suspect the ribbon issue #1123 also is caused by this, I don't have computer access in the next few days but remember to also check fillrange and ribbon when fixing this.

Nice, well spotted @piever! It's already fixed in #1142. I will close #1123 when I merge.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkofod picture pkofod  路  3Comments

apalugniok picture apalugniok  路  3Comments

Cody-G picture Cody-G  路  4Comments

kersulis picture kersulis  路  5Comments

SebastianM-C picture SebastianM-C  路  4Comments