redo necessary checks

This commit is contained in:
Simon Christ 2020-03-06 03:45:36 +01:00
parent 0dff47e577
commit 82f68a7c90

View File

@ -292,7 +292,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
if sf isa Number || sf isa AVec if sf isa Number || sf isa AVec
pgfx_fillrange_series!( axis, series, series_func, i, _cycle(sf, rng), rng) pgfx_fillrange_series!( axis, series, series_func, i, _cycle(sf, rng), rng)
end end
if sp[:legend] != :none && pgfx_should_add_to_legend(series) if i == 1 && sp[:legend] != :none && pgfx_should_add_to_legend(series)
pgfx_filllegend!(series_opt, opt) pgfx_filllegend!(series_opt, opt)
end end
end end
@ -331,7 +331,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
) )
end end
# add to legend? # add to legend?
if sp[:legend] != :none && pgfx_should_add_to_legend(series) if i == 1 && sp[:legend] != :none && pgfx_should_add_to_legend(series)
leg_opt = PGFPlotsX.Options() leg_opt = PGFPlotsX.Options()
if ribbon !== nothing if ribbon !== nothing
pgfx_filllegend!(axis.contents[end-3].options, opt) pgfx_filllegend!(axis.contents[end-3].options, opt)