translated pgf_fillrange_series

This commit is contained in:
Simon Christ 2019-11-18 11:51:03 +01:00
parent 7f1863f3b9
commit fc6dfb8dcb

View File

@ -241,8 +241,9 @@ function pgf_series(sp::Subplot, series::Series)
series_collection series_collection
end end
function pgfx_fillrange_series!(opt, series, i, fillrange, args...) function pgfx_fillrange_series(series, i, fillrange, args...)
st = series[:seriestype] st = series[:seriestype]
opt = PGFPlotsX.Options()
push!(opt, "line width" => 0) push!(opt, "line width" => 0)
push!(opt, "draw opacity" => 0) push!(opt, "draw opacity" => 0)
push!(opt, pgfx_fillopt(series, i)) push!(opt, pgfx_fillopt(series, i))
@ -251,18 +252,18 @@ function pgfx_fillrange_series!(opt, series, i, fillrange, args...)
if haskey(_pgfx_series_extraopt, st) if haskey(_pgfx_series_extraopt, st)
push!(opt, _pgfx_series_extrastyle[st] => nothing) push!(opt, _pgfx_series_extrastyle[st] => nothing)
end end
# TODO: what are those fillrange_args about? func = is3d(series) ? PGFPlotsX.Plot3 : PGFPlotsX.Plot
# return func(pgf_fillrange_args(fillrange, args...)...; kw...) return func(opt, pgfx_fillrange_args(fillrange, args...)...)
end end
function pgf_fillrange_args(fillrange, x, y) function pgfx_fillrange_args(fillrange, x, y)
n = length(x) n = length(x)
x_fill = [x; x[n:-1:1]; x[1]] x_fill = [x; x[n:-1:1]; x[1]]
y_fill = [y; _cycle(fillrange, n:-1:1); y[1]] y_fill = [y; _cycle(fillrange, n:-1:1); y[1]]
return x_fill, y_fill return x_fill, y_fill
end end
function pgf_fillrange_args(fillrange, x, y, z) function pgfx_fillrange_args(fillrange, x, y, z)
n = length(x) n = length(x)
x_fill = [x; x[n:-1:1]; x[1]] x_fill = [x; x[n:-1:1]; x[1]]
y_fill = [y; y[n:-1:1]; x[1]] y_fill = [y; y[n:-1:1]; x[1]]