Creating a 1D heat map from a line graph
问题 Is it possible to create a 1D heat map from data in a line graph? i.e. I'd like the highest values in y to represent the warmer colours in a heat map. I've attached an example image of the heat map I'd like it to look like as well as data I currently have in the line graph. 1D heat map and graph example: To get the heatmap in the image shown I used the following code in python with matplotlib.pyplot: heatmap, xedges, yedges = np.histogram2d(x, y, bins=(np.linspace(0,length_track,length_track