forget extra ribbon plot legend entries

This commit is contained in:
Simon Christ 2019-12-09 11:21:33 +01:00
parent 203e351cef
commit 0e694a9767

View File

@ -633,7 +633,8 @@ function pgfx_add_ribbons!( axis, series, segment_plot, series_func, series_inde
ribbon_opt_plus = merge(segment_plot.options, PGFPlotsX.Options( ribbon_opt_plus = merge(segment_plot.options, PGFPlotsX.Options(
"name path" => ribbon_name_plus, "name path" => ribbon_name_plus,
"color" => opt[:fillcolor], "color" => opt[:fillcolor],
"draw opacity" => opt[:fillalpha] "draw opacity" => opt[:fillalpha],
"forget plot" => nothing
)) ))
coordinates_plus = PGFPlotsX.Coordinates(opt[:x], opt[:y] .+ ribbon_yp) coordinates_plus = PGFPlotsX.Coordinates(opt[:x], opt[:y] .+ ribbon_yp)
ribbon_plot_plus = series_func( ribbon_plot_plus = series_func(
@ -646,7 +647,8 @@ function pgfx_add_ribbons!( axis, series, segment_plot, series_func, series_inde
ribbon_opt_minus = merge(segment_plot.options, PGFPlotsX.Options( ribbon_opt_minus = merge(segment_plot.options, PGFPlotsX.Options(
"name path" => ribbon_name_minus, "name path" => ribbon_name_minus,
"color" => opt[:fillcolor], "color" => opt[:fillcolor],
"draw opacity" => opt[:fillalpha] "draw opacity" => opt[:fillalpha],
"forget plot" => nothing
)) ))
coordinates_plus = PGFPlotsX.Coordinates(opt[:x], opt[:y] .- ribbon_ym) coordinates_plus = PGFPlotsX.Coordinates(opt[:x], opt[:y] .- ribbon_ym)
ribbon_plot_plus = series_func( ribbon_plot_plus = series_func(
@ -656,7 +658,7 @@ function pgfx_add_ribbons!( axis, series, segment_plot, series_func, series_inde
push!(axis, ribbon_plot_plus) push!(axis, ribbon_plot_plus)
# fill # fill
push!(axis, series_func( push!(axis, series_func(
pgfx_fillstyle(opt, series_index), merge(pgfx_fillstyle(opt, series_index), PGFPlotsX.Options("forget plot" => nothing)),
"fill between [of=$(ribbon_name_plus) and $(ribbon_name_minus)]" "fill between [of=$(ribbon_name_plus) and $(ribbon_name_minus)]"
)) ))
return axis return axis