so I am trying to create a heatmap plot for x, y data that are shaped as following:
xs, ys, corrs = [], [], []
for x in np.linspace(0.1,5,25):
xs.append(x)
for y in np.linspace(0.01,x,25):
ys.append(y)
corr = function_to_calculte_corr()
corrs.append(corr)
Now I would like to make a heatplot of corrs in the xs, ys plane. I have tried multiple times both with imshow
and pcolormesh
but do not seem to find the correct way. The problem is that the ys
are differently spaced for each x
value and they arrive until the corresponding x
value, so I should be getting a plot where above the diagonal y=x
should be blank.
Any help with it? Thanks in advance 🙂