Math — Plot: Modulus Functions
|x| and the translated |x - 2|.
Rendering…
Make it your own.
{
"data": [
{"type":"scatter","mode":"lines","name":"|x|","line":{"color":"#2563eb","width":3},
"x":[-4,-3,-2,-1,0,1,2,3,4],"y":[4,3,2,1,0,1,2,3,4]},
{"type":"scatter","mode":"lines","name":"|x - 2|","line":{"color":"#db2777","width":3},
"x":[-4,-3,-2,-1,0,1,2,3,4],"y":[6,5,4,3,2,1,0,1,2]}
],
"layout": {"title":"Modulus functions","xaxis":{"title":"x"},"yaxis":{"title":"y"}}
}