I have a numpy array X
that has
[[-2.26188258 0.83339356]
[-2.04141033 0.84618611]
[-2.09993514 0.97093103]
[-2.22863577 0.70044229]
[-1.98995538 1.04537757]
[-1.98696162 0.81267152]
[-2.14523421 0.92106693]]
I want to use pyplot.plot
to use the first element of each item as x
and the second element as y
to plot a scatter plot.
xval = [x[0] for x in X]
yval = [x[1] for x in X]
ax.plot(x = xval, y = yval, marker = 'o', linestyle = 'None', color = dbclrs[i + 1])
this is what I tried, but it gives me an empty plot. I am trying not to use the scatter
function.