I’ve been spending hours trying to get the colormaps to work, and I am still having no luck. All the examples I have found seem to use imshow() rather than the figure() and plot(). This is a very simple thing I am trying to do, a 2D x-y plot, with z values represented by a color.
Basically, I have 3 numpy ndarrays:
x - x values
y - y values
z - color values
Obviously, it is trivial to plot the x and y values:
plt.plot(x, y, “bo”)
But how to I use the z array to use the inbuilt colormap features?
I’ve tried things like:
plt.plot(x, y, color=matplotlib.cm.jet(z), marker=‘o’, markersize=6)
But it doesn’t seem to work - how do I get this working?