Usually scatter plots use one x value, one y value. The point is colored using a z value. My scatter plot requirement is different. I have a list of x points, list of y points to be plotted using a z value or one color. My code:
samdf = pd.DataFrame({'x':[[1,2,3],4,5,6],
'y':[[10,20,30],40,50,60],
'z':[7,8,9,10]})
plt.scatter(samdf['x'],samdf['y'],c=samdf['z'],cmap='jet')
plt.colorbar()
plt.show()
Present output:
ValueError: setting an array element with a sequence.