Print out MDS comment if it failed at the initial trial#29
Open
yunshiuan wants to merge 2 commits intorsagroup:developfrom
Open
Print out MDS comment if it failed at the initial trial#29yunshiuan wants to merge 2 commits intorsagroup:developfrom
yunshiuan wants to merge 2 commits intorsagroup:developfrom
Conversation
By design, when MDS failed at the initial trial, it might be fixed (in the catch blocks) by changing criterion from user-specified criterion to 'stress', or adding 0.2 to distances to avoid colocalization. However, this information is never shown or accessible by users. That is, MDS plot is displayed as normal and users could easily ignore the fact that the MDS criterion might have been changed. Therefore, I edit the codes so that whenever the MDS fails at the initial trial (and is fixed afterwards by the catch blocks), the description of the changes made is visible to the users.
(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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
By design, when MDS failed at the initial trial, it might be fixed (in the catch blocks) by changing criterion from user-specified criterion to 'stress', or adding 0.2 to distances to avoid colocalization. However, this information is never shown or accessible by users. That is, MDS plot is displayed as normal and users could easily ignore the fact that the MDS criterion might have been changed. Therefore, I edit the codes so that whenever the MDS fails at the initial trial (and is fixed afterwards by the catch blocks), the description of the changes made is visible to the users.