I have data that I make a scatter plot for i.e. (x,y). But for each point I also have a third value say for example the temperature at that point. I'd like to make a colorbar next to the y axis which represents the temperature variation for my points. I have looked at documentation on the matplotlib website but can't seem to figure out. I have my data as lists so for instance:
x = [1,2,3,4]
y = [10,20,30,40]
and Temp = [100,200,300,400]
I make plots using plt.plot(x,y) but for the colorbars what goes in plt.colorbar(?)?
It's a really simple problem I am sure, but I need the solution fairly soon and am having trouble working it out so will appreciate any suggestion. Thanks.