79826246

Date: 2025-11-21 08:07:12
Score: 1
Natty:
Report link

You could setup a customized colormap using your Lat_matrix. Here an example using your variable names:

P_acc_matrix = magic(10);
heatmap(P_acc_matrix)
Lat_matrix = randn(10,10);
skyColormap = sky(100);
[~,idx] = sort(Lat_matrix(:));
skyColormapNew = skyColormap(idx,:);
colormap(skyColormapNew)

CustomHeatmap

The colorbar looks weird now but you can remove it if you want..

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Till