X=[[0,3,4,0,1,1], [0,0,0,5,1,1], [6,7,0,8,1,1], [3,6,1,5,6,1]] Y=[12,15,11,10] I have the lists how to do the scatter plot to visualize the X , Y to check that relationship??
X=[[0,3,4,0,1,1], [0,0,0,5,1,1], [6,7,0,8,1,1], [3,6,1,5,6,1]] Y=[12,15,11,10] I have the lists how to do the scatter plot to visualize the X , Y to check that relationship??
Your X being in the wrong orientation, I'm using a numpy array to easily transpose it. Then it's just a matter of plotting it on the same axis, changing the colors so you can see what's what.
import numpy as np import matplotlib.pyplot as plt x_arr = np.array(X) y = np.array(Y) fig, ax = plt.subplots() colors=list('bgrcmykw') for i, x in enumerate(x_arr.T): ax.scatter(x,y, c=colors[i]) plt.show()