I've got an array of values I want to plot on a 1D heatmap in mmatplotlib. I'm using contourf for this. My current code is this:
x = np.empty([2,values.shape[0]])
x[:,:] = values
ax1.contourf(x)
This plots a colourmap but using the position of each value in the 'value' array as its x coordinate. How can I specify the x values on this heatmap? (I found this code on stackoverflow, and in all honestly I'm not entirely sure how it works.)