Add recipe for seriestype=:stepmid
This commit is contained in:
parent
3bb406e0ea
commit
50f1106cd7
@ -229,6 +229,31 @@ make_steps(t::Tuple, st, even) = Tuple(make_steps(ti, st, even) for ti in t)
|
||||
end
|
||||
@deps steppre path scatter
|
||||
|
||||
# create a path from steps
|
||||
@recipe function f(::Type{Val{:stepmid}}, x, y, z)
|
||||
plotattributes[:x] = make_steps(x, :mid, true)
|
||||
plotattributes[:y] = make_steps(y, :post, true)
|
||||
seriestype := :path
|
||||
|
||||
# handle fillrange
|
||||
plotattributes[:fillrange] = make_steps(plotattributes[:fillrange], :post, true)
|
||||
|
||||
# create a secondary series for the markers
|
||||
if plotattributes[:markershape] != :none
|
||||
@series begin
|
||||
seriestype := :scatter
|
||||
x := x
|
||||
y := y
|
||||
label := ""
|
||||
primary := false
|
||||
()
|
||||
end
|
||||
markershape := :none
|
||||
end
|
||||
()
|
||||
end
|
||||
@deps stepmid path scatter
|
||||
|
||||
# create a path from steps
|
||||
@recipe function f(::Type{Val{:steppost}}, x, y, z)
|
||||
plotattributes[:x] = make_steps(x, :pre, false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user