Fix bugs regarding saveas() at the end #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(1)Comment out the saveas() block at the end (line 1044).
"gcf" has already been closed by handleCurrentFigure() (line 942 and 1041), and the plots have already been saved as files.
Thus, any attempt to call saveas(gcf,...) is needless. ( With gcf being closed, this will only save a blank file).
In case if one would like to keep the saveas() block uncommented, there are several bugs to be fixed.
(2)Initiate userOptions.saveFigureFig in the "set default options" block.
Error Message:
Reference to non-existent field 'saveFigureFig'.
line 1051 in compareRefRDM2candRDMs.m.
Reason:
The field 'userOptions.saveFigureFig' is not initiated at the "set default options" block.
(3)Typo: "userOptions.saveFigureEPS" is mistakenly typed as "userOptions.savesFigurePS". (line 1048)
Old:
if userOptions.saveFiguresPS
saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
end
Fixed:
if userOptions.saveFigureEPS
saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
end