Closed MarkKramer closed 2 years ago
It is possible, but this would need to be done manually; spm1d currently supports only basic plotting options. The relevant code is in ./spm1dmatlab/+spm1d/+plot/Plotter.m
, and below is a slightly simplified version of the plot_p_values
function. By modifying the set
command you should be able to change the font size.
function [hh] = plot_p_values(spmi)
offset = 0;
hh = zeros(1, spmi.nClusters);
for i = 1:spmi.nClusters
cluster = spmi.clusters{i};
if cluster.iswrapped
h = self.plot_p_value_wrapped(cluster, offset);
else
xy = cluster.xy;
h = text(xy(1)+offset(1), xy(2)+offset(2), self.p2str(cluster.P));
end
hh(i) = h;
end
set(hh, 'HorizontalAlignment','center', 'BackgroundColor', 0.95*[1 1 1])
hh = num2cell(hh);
end
Perfect. THank you Prof Pataky.
Dear colleagues,
I just wanted to know if it is possible to automatically change the fontsize of the p-value labels? Presently the plotting code is:
I tried spmi.plot_p_values('FontSize', 8), but this does not work. Is there perhaps another way to do this?
Kind regards,
Mark