Skip to content
Plotly templates

Math — Plot: Cubic with Turning Points

y = x^3 - 3x, showing a local max and min.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {"type":"scatter","mode":"lines","name":"y = x^3 - 3x","line":{"color":"#9333ea","width":3},
     "x":[-2.5,-2,-1.5,-1,0,1,1.5,2,2.5],"y":[-8.1,-2,1.13,2,0,-2,-1.13,2,8.1]}
  ],
  "layout": {"title":"Cubic with turning points","xaxis":{"title":"x"},"yaxis":{"title":"y"}}
}