Hi, thank you for making the PACTools first, it is a great EEGLAB extension!
However, I found two problems when plotting the significance mask in "comodulogram.m" on MATLAB R2020b.
On line 44, linkaxes([haxes,haxes2]); will set the axis limit to the minimum and maximum limit of the two axes. For example, if the xLim of haxes is [4,15], and the xLim of the newly created haxes2 is [0,1], then linkaxes will set the axes limit to [0,15] (at least on MATLAB R2020b), which is not our goal. I suggest directly setting the axes limit of haxes2 according to haxes. For example:
set(haxes2,'XLim',get(haxes,'XLim'));set(haxes2,'YLim',get(haxes,'YLim'));
On line 45, the significant mask is plotted as:
h_trans = pcolor(freqs_amp,freqs_phase,int8(g.signifmask), 'parent', haxes2);
This looks strange to me because the x-axis and y-axis are flipped. According to the way to plot PAC values on line 18, I guess it should be changed to:
h_trans = pcolor(freqs_phase,freqs_amp,int8(g.signifmask'), 'parent', haxes2);
Hi @CloudyDory , Thanks for submitting the report. See comments below.
Regarding the first report. This is fine the way it is. The function linkaxis is not used to set limits, in every instance, haxes and haxes2 will have the same dimensions. So nothing to do here...
Here there was indeed an issue from a previous update to flip the x-axes in the comodulogram. It should be fine now. Note your solution needed a transpose to fit the dimensions.
Thanks,
Ramon
Hi, thank you for making the PACTools first, it is a great EEGLAB extension!
However, I found two problems when plotting the significance mask in "comodulogram.m" on MATLAB R2020b.
linkaxes([haxes,haxes2]);
will set the axis limit to the minimum and maximum limit of the two axes. For example, if the xLim ofhaxes
is[4,15]
, and the xLim of the newly createdhaxes2
is[0,1]
, thenlinkaxes
will set the axes limit to[0,15]
(at least on MATLAB R2020b), which is not our goal. I suggest directly setting the axes limit ofhaxes2
according tohaxes
. For example:set(haxes2,'XLim',get(haxes,'XLim'));
set(haxes2,'YLim',get(haxes,'YLim'));
h_trans = pcolor(freqs_amp,freqs_phase,int8(g.signifmask), 'parent', haxes2);
This looks strange to me because the x-axis and y-axis are flipped. According to the way to plot PAC values on line 18, I guess it should be changed to:h_trans = pcolor(freqs_phase,freqs_amp,int8(g.signifmask'), 'parent', haxes2);
Best, Zhou