Implementation of filling the space between and under curves for gaston (#3755)
This commit is contained in:
parent
ded808477d
commit
7b8bd5b253
@ -225,13 +225,13 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
|
||||
gsp = sp.o
|
||||
x, y, z = series[:x], series[:y], series[:z]
|
||||
st = series[:seriestype]
|
||||
|
||||
curves = []
|
||||
if gsp.dims == 2 && z === nothing
|
||||
for (n, seg) in enumerate(series_segments(series, st; check = true))
|
||||
i, rng = seg.attr_index, seg.range
|
||||
fr =_cycle(series[:fillrange], 1:length(x[rng]))
|
||||
for sc in gaston_seriesconf!(sp, series, i, n == 1)
|
||||
push!(curves, Gaston.Curve(x[rng], y[rng], nothing, nothing, sc))
|
||||
push!(curves, Gaston.Curve(x[rng], y[rng], nothing, fr, sc))
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -304,8 +304,12 @@ function gaston_seriesconf!(
|
||||
pt, ps, mc = gaston_mk_ms_mc(series, clims, i)
|
||||
push!(curveconf, "w points pt $pt ps $ps lc $mc")
|
||||
elseif st ∈ (:path, :straightline, :path3d)
|
||||
fr = series[:fillrange]
|
||||
fc = gaston_color(get_fillcolor(series, i), get_fillalpha(series, i))
|
||||
lc, dt, lw = gaston_lc_ls_lw(series, clims, i)
|
||||
if series[:markershape] == :none # simplepath
|
||||
if fr !== nothing # filled curves, but not filled curves with markers
|
||||
push!(curveconf, "w filledcurves fc $fc fs solid border lc $lc lw $lw dt $dt,'' w lines lc $lc lw $lw dt $dt")
|
||||
elseif series[:markershape] == :none # simplepath
|
||||
push!(curveconf, "w lines lc $lc dt $dt lw $lw")
|
||||
else
|
||||
pt, ps, mc = gaston_mk_ms_mc(series, clims, i)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user