fix ribbons
This commit is contained in:
parent
0d776fd09d
commit
70acf9359a
@ -344,8 +344,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
end
|
end
|
||||||
# add fillrange
|
# add fillrange
|
||||||
if sf !== nothing &&
|
if sf !== nothing &&
|
||||||
!isfilledcontour(series) &&
|
!isfilledcontour(series)
|
||||||
series[:ribbon] === nothing
|
|
||||||
if sf isa Number || sf isa AVec
|
if sf isa Number || sf isa AVec
|
||||||
pgfx_fillrange_series!(
|
pgfx_fillrange_series!(
|
||||||
axis,
|
axis,
|
||||||
@ -355,6 +354,17 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
_cycle(sf, rng),
|
_cycle(sf, rng),
|
||||||
rng,
|
rng,
|
||||||
)
|
)
|
||||||
|
elseif sf isa Tuple
|
||||||
|
for sfi in sf
|
||||||
|
pgfx_fillrange_series!(
|
||||||
|
axis,
|
||||||
|
series,
|
||||||
|
series_func,
|
||||||
|
i,
|
||||||
|
_cycle(sfi, rng),
|
||||||
|
rng,
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if i == 1 &&
|
if i == 1 &&
|
||||||
sp[:legend] != :none && pgfx_should_add_to_legend(series)
|
sp[:legend] != :none && pgfx_should_add_to_legend(series)
|
||||||
@ -384,18 +394,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
# add ribbons?
|
|
||||||
ribbon = series[:ribbon]
|
|
||||||
if ribbon !== nothing
|
|
||||||
pgfx_add_ribbons!(
|
|
||||||
axis,
|
|
||||||
series,
|
|
||||||
segment_plot,
|
|
||||||
series_func,
|
|
||||||
series_index,
|
|
||||||
)
|
|
||||||
end
|
|
||||||
# add to legend?
|
|
||||||
if sp[:legend] != :none
|
if sp[:legend] != :none
|
||||||
leg_entry = if opt[:label] isa AVec
|
leg_entry = if opt[:label] isa AVec
|
||||||
get(opt[:label], i, "")
|
get(opt[:label], i, "")
|
||||||
@ -412,9 +410,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
push!(axis.contents[end].options, "forget plot" => nothing)
|
push!(axis.contents[end].options, "forget plot" => nothing)
|
||||||
else
|
else
|
||||||
leg_opt = PGFPlotsX.Options()
|
leg_opt = PGFPlotsX.Options()
|
||||||
if ribbon !== nothing
|
|
||||||
pgfx_filllegend!(axis.contents[end - 3].options, opt)
|
|
||||||
end
|
|
||||||
legend = PGFPlotsX.LegendEntry(leg_opt, leg_entry, false)
|
legend = PGFPlotsX.LegendEntry(leg_opt, leg_entry, false)
|
||||||
push!(axis, legend)
|
push!(axis, legend)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user