Math — Plot: Secant & Tangent
A curve with a tangent line illustrating the derivative.
Rendering…
Make it your own.
{
"data": [
{"type":"scatter","mode":"lines","name":"y = x^2","line":{"color":"#2563eb","width":3},
"x":[0,0.5,1,1.5,2,2.5,3],"y":[0,0.25,1,2.25,4,6.25,9]},
{"type":"scatter","mode":"lines","name":"tangent at x=2","line":{"color":"#1f2937","width":2,"dash":"dash"},
"x":[1,3],"y":[0,8]}
],
"layout": {"title":"Tangent to a curve","xaxis":{"title":"x"},"yaxis":{"title":"y"}}
}