I'd like to create a correlation map (such as this one) with an overlaid opacity, defined for each point (such as the correlation maps in the top left corner here), as I would like to show statistically significant correlations only. Is there a way to do this in Matlab or Python (matplotlib)?
Asked
Active
Viewed 123 times
1 Answers
2
You can use the 'AlphaData'
attribute of the plot
% generate random data for example
A = rand(30);
A = A.*A'; %//'
msk = A > .5; % choose values not to be masked
figure;
ih = imagesc(A);
set(ih, 'AlphaData', msk );
axis([ 1 30 1 30 ] );
And the result:

Shai
- 111,146
- 38
- 238
- 371