Commit 0d4f09ad authored by Sam Harrison's avatar Sam Harrison
Browse files

Remove `TwoColourTufteHist` dependency

New built-in `histogram` function is pretty decent.
parent c6a704a2
......@@ -246,8 +246,9 @@ for s = 1:params.S
PA{s}{r} = PA{s}{r} / mPA;
if plotFigures && (s==1) && (r==1)
figure; TwoColourTufteHist(PA{s}{r}(:), 49, 'normalise', ...
'xlim', 1.2*[-1 1]); xlim(1.2*[-1 1])
figure; histogram(PA{s}{r}(:), linspace(-1.2, 1.2, 50), ...
'Normalization', 'pdf'); xlim(1.2*[-1 1]);
xlabel('Kurtosis'); ylabel('Probility density');
title(sprintf('PA distribution pre-saturation (kurtosis: %.2f)', ...
kurtosis(PA{s}{r}(:))))
......@@ -271,8 +272,9 @@ for s = 1:params.S
legend('Linear', 'Saturating')
title('Saturating HRF: Comparison with linear HRF')
figure; TwoColourTufteHist(PA{s}{r}(:), 49, 'normalise', ...
'xlim', 1.2*[-1 1]); xlim(1.2*[-1 1])
figure; histogram(PA{s}{r}(:), linspace(-1.2, 1.2, 50), ...
'Normalization', 'pdf'); xlim(1.2*[-1 1]);
xlabel('Kurtosis'); ylabel('Probility density');
title(sprintf('PA distribution post-saturation (kurtosis: %.2f)', ...
kurtosis(PA{s}{r}(:))))
end
......
......@@ -137,7 +137,9 @@ end
%Plot noise distribution
if plotFigures
s = randi(params.S,1); r = randi(params.R(s),1);
figure; TwoColourTufteHist(noise{s}{r} / std(noise{s}{r}(:)), 'normalise')
figure; histogram(noise{s}{r} / std(noise{s}{r}(:)), ...
'Normalization', 'pdf');
xlabel('Noise'); ylabel('Probility density');
title(sprintf('Noise distribution (kurtosis: %.2f)', kurtosis(noise{s}{r}(:))))
end
......@@ -203,7 +205,9 @@ end
%Plot noise distribution
if plotFigures
s = randi(params.S,1); r = randi(params.R(s),1);
figure; TwoColourTufteHist(noise{s}{r} / std(noise{s}{r}(:)), 'normalise')
figure; histogram(noise{s}{r} / std(noise{s}{r}(:)), ...
'Normalization', 'pdf');
xlabel('Noise'); ylabel('Probility density');
title(sprintf('Noise distribution (kurtosis: %.2f)', kurtosis(noise{s}{r}(:))))
[U,S,V] = svd(noise{s}{r}, 0);
......
......@@ -501,7 +501,8 @@ colorbar; colormap(bluewhitered)
title('Mean map')
%And the distribution of weights
figure; TwoColourTufteHist(Pg(:), 'normalise')
figure; histogram(Pg(:), 'Normalization', 'pdf');
xlabel('Voxel value'); ylabel('Probility density');
title(sprintf('Mean map distribution (kurtosis: %.2f)', kurtosis(Pg(:))))
%Spatial correlations
......@@ -561,8 +562,9 @@ PsPg = NaN(params.N, params.S); inds = 1:params.N;
for s = 1:params.S
PsPg(:,s) = diag(cP( inds, s*params.N+inds ));
end
figure; TwoColourTufteHist(PsPg(:), 'xlim', [-1 1], 'normalise');
xlabel('Correlation'); ylabel('Relative Frequency')
figure; histogram(PsPg(:), linspace(-1.0, 1.0, 50), ...
'Normalization', 'pdf'); xlim([-1.0 1.0]);
xlabel('Correlation'); ylabel('Probility density');
title('Subject map - mean map correlations')
%Then to each other
......@@ -570,8 +572,9 @@ cP = cP((params.N+1):end, (params.N+1):end); PsPs = [ ];
for s = 1:(params.S-1)
PsPs = [PsPs; diag(cP, s*params.N)];
end
figure; TwoColourTufteHist(PsPs(:), 'xlim', [-1 1], 'normalise');
xlabel('Correlation'); ylabel('Relative Frequency')
figure; histogram(PsPs(:), linspace(-1.0, 1.0, 50), ...
'Normalization', 'pdf'); xlim([-1.0 1.0]);
xlabel('Correlation'); ylabel('Probility density');
title('Subject map - subject map correlations')
%--------------------------------------------------------------------------
......
......@@ -190,8 +190,8 @@ set(gca, 'YTick', 0); ylabel('FFT')
title('Frequency content of neuronal signal')
%Plot the distribution of values
figure; TwoColourTufteHist(An{s}{r}(:), 'normalise')
xlabel('Neural signal (a.u.)'); ylabel('Relative Frequency')
figure; histogram(An{s}{r}(:), 'Normalization', 'pdf');
xlabel('Neural signal (a.u.)'); ylabel('Probility density');
title('Distribution of neural activity')
%Look at temporal correlations
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment