Merge pull request #2435 from BeastyBlacksmith/pgfplotsx

fix legends with skipped entries
This commit is contained in:
Simon Christ 2020-03-04 21:49:45 +01:00 committed by GitHub
commit 25c53f0e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,6 +255,9 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
end
for (i, rng) in enumerate(segments)
segment_opt = PGFPlotsX.Options()
if opt[:label] == ""
push!(segment_opt, "forget plot" => nothing)
end
segment_opt = merge(segment_opt, pgfx_linestyle(opt, i))
if opt[:markershape] != :none
marker = opt[:markershape]