Skip to content

Commit

Permalink
adapted some function to be compatible with R2018b (wrt legend function)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminBlankertz committed Mar 19, 2019
1 parent 875ee45 commit a30ce0b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions visualization/plot_scalpEvolutionPlusChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
else
hhh= H.channel;
end
% The following part can be removed. We do not allow numeric values
% for LegendPos anymore.
% Check matlab version for downward compatability
if str2double(strtok(version,'.'))<7
H.leg= legend(hhh.plot, erp.className, opt.LegendPos);
Expand Down
6 changes: 3 additions & 3 deletions visualization/plot_scalpPatternsPlusChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
% defines the interval for the k-th Class.
% OPTS: struct or property/value list of optional fields/properties:
% .LegendPos - specifies the position of the legend in the ERP plot,
% default 0 (see help of legend for choices).
% default 'best' (see man page of legend for choices).
% .MarkIval - When true, the time interval is marked in the channel plot.
%
%The opts struct is passed to plot_scalpPattern
Expand All @@ -36,7 +36,7 @@
'XUnit', '[ms]', 'CHAR';
'PlotChannel', 1, 'BOOL';
'ScalePos', 'vert', 'CHAR';
'LegendPos', 0, 'CHAR|DOUBLE[1]|DOUBLE[4]';
'LegendPos', 'best', 'CHAR';
'NewColormap', 0, 'BOOL';
'MarkPatterns', [], 'DOUBLE|CHAR';
'MarkStyle', {'LineWidth',3}, 'CELL';
Expand Down Expand Up @@ -188,7 +188,7 @@
end
set(get(h.ax_erp, 'title'), 'FontSize',12, 'fontWeight','bold');
if ~isequal(opt.LegendPos, 'none'),
h.leg= legend(erp.className, opt.LegendPos);
h.leg= legend(erp.className, 'Location',opt.LegendPos);
end
end

Expand Down
2 changes: 1 addition & 1 deletion visualization/utils/axis_title.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'HorizontalAlignment' 'center' '!CHAR(left center right)';
'VerticalAlignment' 'bottom' '!CHAR(bottom center baseline top)';
'FontWeight' get(gca, 'FontWeight') '!CHAR(normal bold light demi)';
'FontSize' get(gca, 'FontSize') '!INT'
'FontSize' get(gca, 'FontSize') '!DOUBLE'
};

if nargin==0,
Expand Down
4 changes: 2 additions & 2 deletions visualization/utils/plotutil_channel1D.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
'ColorOrder', get(gca,'ColorOrder'), 'DOUBLE[- 3]';
'GridOverPatches', 1, 'BOOL';
'Legend', 1, 'BOOL';
'LegendPos', 0, 'CHAR|DOUBLE[1]|DOUBLE[4]';
'LegendPos', 'best', 'CHAR';
'LineWidth', 2, 'DOUBLE';
'LineStyle', '-', 'CHAR';
'LineStyleOrder', {}, 'CELL{CHAR}'
Expand Down Expand Up @@ -478,7 +478,7 @@
end

if opt.Legend && opt.Butterfly==0
H.leg= legend(H.plot, epo.className, opt.LegendPos);
H.leg= legend(H.plot, epo.className, 'Location',opt.LegendPos);
else
H.leg= NaN;
end
Expand Down

0 comments on commit a30ce0b

Please sign in to comment.