How does plotly plot a scatter plot? What is the logic behind it? If I have a NumPy array-like
import numpy as np
arr = np.array([[1,2,3,1,2,3,4],[1,1,1,1,1,-6,4],[0,0,0,0,0,0,4],[-3,-2,-1,1,2,3,4],[1,1,15,1,2,-999,4]])
and I am using the following code to plot the array:
import plotly.express as px
fig = px.scatter(arr, len(arr), width=1000, height=500)
fig.update_layout(xaxis_title='array value', yaxis_title='index')
fig.show()
it has the following values for each point(from top to bottom)
(-999, index = 4)
(3, index =3)
(3, index =3)
(0, index =2)
(-6 index =1)
(3, index =0)
I can well understand the value of the index (or y-axis coordinates ) as they are the length of the array. But how is the x coordinate defied?
Please can someone tell me this?