factor out legend addition
This commit is contained in:
parent
917f7e2c63
commit
f032b40aec
@ -531,7 +531,11 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
# add to legend?
|
pgfx_add_legend!(axis, series, opt, i)
|
||||||
|
end # for segments
|
||||||
|
end
|
||||||
|
|
||||||
|
function pgfx_add_legend!(axis, series, opt, i = 1)
|
||||||
if series[:subplot][:legend] != :none
|
if series[:subplot][:legend] != :none
|
||||||
leg_entry = if opt[:label] isa AVec
|
leg_entry = if opt[:label] isa AVec
|
||||||
get(opt[:label], i, "")
|
get(opt[:label], i, "")
|
||||||
@ -552,7 +556,7 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
|||||||
push!(axis, legend)
|
push!(axis, legend)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end # for segments
|
return nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
pgfx_series_arguments(series, opt, range) = (arg[range] for arg in pgfx_series_arguments(series, opt))
|
pgfx_series_arguments(series, opt, range) = (arg[range] for arg in pgfx_series_arguments(series, opt))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user