stairs
stairs(xs, ys; kwargs...)
Plot a stair function.
The step
parameter can take the following values:
:pre
: horizontal part of step extends to the left of each value inxs
.:post
: horizontal part of step extends to the right of each value inxs
.:center
: horizontal part of step extends halfway between the two adjacent values ofxs
.
The conversion trait of stem is PointBased
.
Attributes
Available attributes and their defaults for Plot{Makie.stairs}
are:
alpha 1.0
color :black
colormap :viridis
colorrange MakieCore.Automatic()
colorscale identity
cycle [:color]
depth_shift 0.0f0
highclip MakieCore.Automatic()
inspectable true
linestyle "nothing"
linewidth 1.5
lowclip MakieCore.Automatic()
nan_color :transparent
overdraw false
space :data
ssao false
step :pre
transparency false
visible true
Examples
using CairoMakie
f = Figure()
xs = LinRange(0, 4pi, 21)
ys = sin.(xs)
stairs(f[1, 1], xs, ys)
stairs(f[2, 1], xs, ys; step=:post, color=:blue, linestyle=:dash)
stairs(f[3, 1], xs, ys; step=:center, color=:red, linestyle=:dot)
f
© Makie.jl. Last modified: May 07, 2024. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using Makie: v0.20.10, GLMakie: v0.9.11, CairoMakie: v0.11.12, WGLMakie: v0.9.10