From cd0c5ad77642b609708294b32874f89d7e12d41b Mon Sep 17 00:00:00 2001 From: Victor Vera Frazao Date: Tue, 12 Dec 2023 15:20:10 +0100 Subject: [PATCH] Added label caps and updated png saving location to regr directory --- bin/3.3_fMRIActivity/plotfMRI_mat.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/3.3_fMRIActivity/plotfMRI_mat.py b/bin/3.3_fMRIActivity/plotfMRI_mat.py index 7abcc7c..c08943b 100755 --- a/bin/3.3_fMRIActivity/plotfMRI_mat.py +++ b/bin/3.3_fMRIActivity/plotfMRI_mat.py @@ -19,7 +19,7 @@ import seaborn as sns -def matrixMaker(matData): +def matrixMaker(matData, output_path): unCorrmatrix = matData['matrix'] labels = matData['label'] @@ -48,8 +48,9 @@ def matrixMaker(matData): rotation_mode="anchor") ax.set_title("rsfMRI Correlation between ARA regions") - plt.show() - + output_file = os.path.join(output_path, "CorrMatrixHM") + plt.savefig(output_file) + plt.close return corrMatrix @@ -71,4 +72,4 @@ def matrixMaker(matData): matData = sio.loadmat(inputPath) # generate Matrix - matrixMaker(matData) + matrixMaker(matData, os.path.dirname(inputPath))