hspan and vspan recipes
This commit is contained in:
parent
0ace28b784
commit
f56d944870
@ -187,6 +187,8 @@ include("output.jl")
|
|||||||
@shorthands sticks
|
@shorthands sticks
|
||||||
@shorthands hline
|
@shorthands hline
|
||||||
@shorthands vline
|
@shorthands vline
|
||||||
|
@shorthands hspan
|
||||||
|
@shorthands vspan
|
||||||
@shorthands ohlc
|
@shorthands ohlc
|
||||||
@shorthands contour
|
@shorthands contour
|
||||||
@shorthands contourf
|
@shorthands contourf
|
||||||
|
|||||||
@ -100,6 +100,30 @@ end
|
|||||||
end
|
end
|
||||||
@deps vline straightline
|
@deps vline straightline
|
||||||
|
|
||||||
|
@recipe function f(::Type{Val{:hspan}}, x, y, z)
|
||||||
|
n = div(length(y), 2)
|
||||||
|
newx = repeat([-Inf, Inf, Inf, -Inf, NaN], outer = n)
|
||||||
|
newy = vcat([[y[2i-1], y[2i-1], y[2i], y[2i], NaN] for i in 1:n]...)
|
||||||
|
linewidth --> 0
|
||||||
|
x := newx
|
||||||
|
y := newy
|
||||||
|
seriestype := :shape
|
||||||
|
()
|
||||||
|
end
|
||||||
|
@deps hspan shape
|
||||||
|
|
||||||
|
@recipe function f(::Type{Val{:vspan}}, x, y, z)
|
||||||
|
n = div(length(y), 2)
|
||||||
|
newx = vcat([[y[2i-1], y[2i-1], y[2i], y[2i], NaN] for i in 1:n]...)
|
||||||
|
newy = repeat([-Inf, Inf, Inf, -Inf, NaN], outer = n)
|
||||||
|
linewidth --> 0
|
||||||
|
x := newx
|
||||||
|
y := newy
|
||||||
|
seriestype := :shape
|
||||||
|
()
|
||||||
|
end
|
||||||
|
@deps vspan shape
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# path and scatter
|
# path and scatter
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user