Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
profumo
PFM_Simulations
Commits
c39f0592
Commit
c39f0592
authored
Oct 01, 2019
by
Sam Harrison
Browse files
Tidy up figure plotting code
parent
5f77760e
Changes
3
Hide whitespace changes
Inline
Side-by-side
RunTests.m
View file @
c39f0592
...
...
@@ -36,9 +36,7 @@ plotFigures = false;
restoredefaultpath
();
initialiseEnvironment
();
if
plotFigures
prettyFigures
();
end
prettyFigures
();
rng
(
'shuffle'
);
...
...
Scoring/calculateDecompositionAccuracy.m
View file @
c39f0592
...
...
@@ -143,7 +143,7 @@ scores.pcA.metric = 'Cosine similarity';
scores
.
pcA
.
range
=
[
-
1.0
,
1.0
];
% Each element, across subjects (i.e. behavioural prediction)
scores
.
pcA_xs
.
data
=
diag
(
corr
(
pcAz
', inf_pcAz'
));
scores
.
pcA_xs
.
name
=
'Netmats (cross subject
corrs
)'
;
scores
.
pcA_xs
.
name
=
'Netmats (cross subject)'
;
scores
.
pcA_xs
.
metric
=
'Correlation'
;
scores
.
pcA_xs
.
range
=
[
-
1.0
,
1.0
];
...
...
Visualisation/plotScores.m
View file @
c39f0592
...
...
@@ -15,6 +15,10 @@ else
visibility
=
'off'
;
end
% https://github.com/altmany/export_fig/issues/75
warning
(
'off'
,
'MATLAB:prnRenderer:opengl'
);
warning
(
'off'
,
'export_fig:transparency'
);
%--------------------------------------------------------------------------
% Get all the metadata sorted
...
...
@@ -43,26 +47,26 @@ for test = tests'
plotDistributions
(
results
.
methods
,
results
.
data
,
visibility
);
ylim
(
results
.
range
+
0.025
*
diff
(
results
.
range
)
*
[
-
1
;
1
]);
ylabel
(
results
.
metric
);
title
(
results
.
name
);
if
saveFigures
set
(
gcf
(),
'Position'
,
figPosSquare
);
set
(
gcf
(),
'Color'
,
'w'
);
export_fig
(
...
fullfile
(
outputDir
,
strrep
(
results
.
name
,
' '
,
'_'
)),
...
'-pdf'
)
% '-transparent'
'-pdf'
,
'-painters'
)
% '-transparent'
end
title
(
results
.
name
);
% And all data
plotAllVals
(
results
.
methods
,
results
.
data
,
results
.
range
,
visibility
);
ylabel
(
results
.
metric
);
title
(
results
.
name
);
if
saveFigures
set
(
gcf
(),
'Position'
,
figPosLong
);
set
(
gcf
(),
'Color'
,
'w'
);
export_fig
(
...
fullfile
(
outputDir
,
[
strrep
(
results
.
name
,
' '
,
'_'
)
'_all'
]),
...
'-pdf'
)
% '-transparent'
'-pdf'
,
'-painters'
)
% '-transparent'
end
title
(
results
.
name
);
end
% Tidy up invisible figures that have been saved
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment