Slope¶
-
Slope(slope, intercept, args...; kvs...)¶ PlotComponentto draw a straight line with slopeslope. The vertical offset is given byinterceptwhich must be a tuple of length 2 containing the coordinates of a point on the line.argsandkvscan be used to set additional style attributes.
Example¶
x = linspace(0, 10)
p = plot(x, x + 1 ./ x, yrange=[-0.5, 10.5])
s = Slope(1, (5, 5), color="red", linekind="dashed")
add(p, s)
