0

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)?

Community
  • 1
  • 1
John Manak
  • 13,328
  • 29
  • 78
  • 119

1 Answers1

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: enter image description here

Shai
  • 111,146
  • 38
  • 238
  • 371