Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions +rsa/+fig/figureMDSArrangement.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ function figureMDSArrangement(RDM, userOptions, localOptions)
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

%% define defaults
Expand Down Expand Up @@ -172,8 +172,8 @@ function figureMDSArrangement(RDM, userOptions, localOptions)
% categories undefined: plot all text labels in black
veryLocalOptions.textLabels = localOptions.textLabels;
veryLocalOptions.dotColours = localOptions.dotColours;
if isfield(localOptions, 'dotSize')
veryLocalOptions.dotSize = localOptions.dotSize;
if isfield(userOptions, 'dotSize')
veryLocalOptions.dotSize = userOptions.dotSize;
end%if
plotDotsWithTextLabels(pats_mds_2D,veryLocalOptions);

Expand Down
2 changes: 1 addition & 1 deletion +rsa/+fmri/fMRIDataPreparation.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
if ~isfield(userOptions, 'rootPath'), error('fMRIDataPreparation:NoRootPath', 'rootPath must be set. See help'); end%if
if ~isfield(userOptions, 'betaPath'), error('fMRIDataPreparation:NoBetaPath', 'betaPath must be set. See help'); end%if
if ~isfield(userOptions, 'subjectNames'), error('fMRIDataPreparation:NoSubjectNames', 'subjectNames must be set. See help'); end%if
if (~isfield(userOptions, 'conditionLabels') && ischar(betaCorrespondence) && strcpmi(betaCorrespondence, 'SPM')), error('fMRIDataPreparation:NoConditionLabels', 'conditionLables must be set if the data is being extracted from SPM.'); end%if
if (~isfield(userOptions, 'conditionLabels') && ischar(betaCorrespondence) && strcmpi(betaCorrespondence, 'SPM')), error('fMRIDataPreparation:NoConditionLabels', 'conditionLables must be set if the data is being extracted from SPM.'); end%if

% The filenames contain the analysisName as specified in the user options file
ImageDataFilename = [userOptions.analysisName, '_ImageData.mat'];
Expand Down
30 changes: 20 additions & 10 deletions +rsa/figureRDMs.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ function figureRDMs(RDMs, userOptions, localOptions)
% ranks preserved. If false, true values are represented.
% Defaults to true. This is for display only.
% userOptions.colourScheme
% A colour scheme for the RDMs. Defualts to jet(64).
% A colour scheme for the RDMs. For Matlab version
% before R2015b,
% defualts to jet(64); for versions afterward,
% defaults to colormap(jet(256)).
%
% localOptions --- Further options.
% localOptions.figureNumber
Expand All @@ -48,17 +51,24 @@ function figureRDMs(RDMs, userOptions, localOptions)
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

returnHere = pwd;

% Detect Matlab version (R2015b changes default color maps: should use
% colormap() to specify the color of the color bar.
matlabVersion = str2num(cell2mat(regexp(version('-release'),'\d+','match')));
if matlabVersion>2015
color=colormap(jet(256));
else
color=jet(64);
end
%% Set defaults and check options struct
if nargin == 2, localOptions = struct(); end%if:nargin
if ~isfield(userOptions, 'analysisName'), error('figureInterleavedRDMs:NoAnalysisName', 'analysisName must be set. See help'); end%if
Expand All @@ -68,7 +78,7 @@ function figureRDMs(RDMs, userOptions, localOptions)
userOptions = setIfUnset(userOptions, 'saveFigureFig', false);
userOptions = setIfUnset(userOptions, 'displayFigures', true);
userOptions = setIfUnset(userOptions, 'rankTransform', true);
userOptions = setIfUnset(userOptions, 'colourScheme', jet(64));
userOptions = setIfUnset(userOptions, 'colourScheme', color);

if ~isfield(userOptions,'dpi'), userOptions.dpi=300; end;
if ~isfield(userOptions,'tightInset')
Expand Down