Skip to content
Plotly templates

Math — Plot: Exponentials of Different Base

Comparing 2^x and 3^x.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {"type":"scatter","mode":"lines+markers","name":"2^x","line":{"color":"#2563eb","width":3},
     "x":[-2,-1,0,1,2,3],"y":[0.25,0.5,1,2,4,8]},
    {"type":"scatter","mode":"lines+markers","name":"3^x","line":{"color":"#16a34a","width":3},
     "x":[-2,-1,0,1,2,3],"y":[0.11,0.33,1,3,9,27]}
  ],
  "layout": {"title":"Exponential functions","xaxis":{"title":"x"},"yaxis":{"title":"y"}}
}