I'm a beginner at programming, and I want to plot my data as a heatmap which has the following structure for a paper I'm currently writing
X = [20,21,21,21,21,21,21,20,20,17,17,16.75,16.5,18,16,16,16,16,22,17.75,19.75,19.75,18.5,17,20.25,18]
Y = [35,24.5,25,32.5,32.5,32.5,25.5,25,25,4.5,4.5,4.5,5,5,2.25,3,5,4.5,12.5,1,6,6,5.25,8.5,6.5,3]
Z = [0,0.215,0,0,0,0,0.1,0.15,0.2,0.25,0.25,0.175,0.14,0.25,0.225,0.175,0.125,0.175,0.1,0.35,0.375,0.375,0.19,0.13,0.275,0.1]
The x and y-axis shall be represented by X and Y, while the 'heat' is represented by the values of Z.
E.g. at coordinate (x,y) = (20,35) the intensity shall be 0. How can this be achieved by using matplotlib? Looking at posts which relate to the keyword heatmap or even to those related to the term contour map, I could not transfer it to this problem yet.
When I try to plot with this code that i found on the net (matlab fit a HeatMap into a subplot) , because theaxes when i import from my csv file it gave me an error:
the error was: ValueError: Index contains duplicate entries, cannot reshape
if someone can help me i will be grateful.