1

I want to show the following data with colors and with a color bar. But I'm not sure that which function should I use for such kind of data. heat maps are for 2D array, meshgid is used when we have values in z axis. So what will be suitable function for plotting this data with colors and connecting the points?

`h = np.array([-1/3,-1/2,-1,-1.2,-1/3,-1/2,-1,-1/2,1/3,1/3])
E = np.array([-2,-2.5,-1,-0.5,0,0.5,0.7,1.0,1.5,2.0])

plt.scatter(E,h,marker='o')`

Like in the following graph they showed data points with color and then fitted a curve. I don't want to fit any curve but I want to show with the help to colors how these data points join. enter image description here

jerry
  • 385
  • 6
  • 18

0 Answers0