Bläddra i källkod

ouput plots only as pdf

Christian O. Häusler 10 månader sedan
förälder
incheckning
135d832fb1

+ 0 - 1
README.md

@@ -347,7 +347,6 @@ More information on DataLad and how to use it can be found in the DataLad Handbo
 	# add plot_corr-of-glm-and-srm.py
 	datalad save -m 'add plot_corr-of-glm-and-srm.py'
 	%run code/plot_corr-of-glm-and-srm.py -model 'sub-01/models/srm-ao-av-vis_feat10-iter30.npz' -o results
-	%run code/plot_corr-of-glm-and-srm.py -model 'sub-01/models/srm-ao-av-vis_shuffled-within_feat10-iter30-0001.npz' -o results
 	%run code/plot_corr-of-glm-and-srm.py -model 'sub-01/models/srm-ao-av-vis_shuffled-across_feat10-iter30-0001.npz' -o results
 
 	# plot_cronbachs.py

+ 1 - 1
code/plot_corr-emp-vs-estimation.py

@@ -331,7 +331,7 @@ if __name__ == "__main__":
     # save the figure
     os.makedirs(outDir, exist_ok=True)
 
-    extensions = ['pdf', 'png', 'svg']
+    extensions = ['pdf']  # , 'png', 'svg']
     nfeat = visResults.split('_')[-1].split('.')[0]
     for extension in extensions:
         fpath = os.path.join(outDir,

+ 1 - 1
code/plot_corr-of-glm-and-srm.py

@@ -223,7 +223,7 @@ def plot_heatmap(title, matrix, outFpath, usedRegressors=[]):
     # create the output path
     os.makedirs(os.path.dirname(outFpath), exist_ok=True)
 
-    extensions = ['pdf', 'png', 'svg']
+    extensions = ['pdf']  # , 'png', 'svg']
     for extension in extensions:
         fpath = os.path.join(f'{out_fpath}.{extension}')
         plt.savefig(fpath, bbox_inches='tight')

+ 4 - 2
code/plot_cronbachs.py

@@ -103,6 +103,8 @@ def plot_stripplot(axis, df):
     '''
     ax = sns.stripplot(ax=axis,
                        data=df,
+                       # hue = list(STIMULICOLORS.keys()),
+                       # hue=STIMULICOLORS.keys(),
                        x='stimulus',
                        y="Cronbach's a",
                        palette = STIMULICOLORS,
@@ -163,10 +165,10 @@ if __name__ == "__main__":
     means = pd.pivot_table(df, index='stimulus', aggfunc=np.mean)
     medians = pd.pivot_table(df, index='stimulus', aggfunc=np.median)
 
-# save the figure
+    # save the figure
     os.makedirs(outDir, exist_ok=True)
 
-    extensions = ['pdf', 'png', 'svg']
+    extensions = ['pdf']  # , 'png', 'svg']
     for extension in extensions:
         fpath = os.path.join(outDir, f'plot_cronbachs.{extension}')
         plt.savefig(fpath, bbox_inches='tight')

+ 1 - 1
code/plot_srm.py

@@ -114,7 +114,7 @@ def plot_feat_x_timepoints(srm):
     plt.tight_layout()
     plt.colorbar()
     # save it
-    plt.savefig(f'test/features{n_feat}_time-points.svg', bbox_inches='tight')
+    plt.savefig(f'test/features{n_feat}_time-points.pdf', bbox_inches='tight')
     plt.close()
 
     return None

+ 1 - 1
code/plot_voxel-counts.py

@@ -167,7 +167,7 @@ if __name__ == "__main__":
     os.makedirs(outDir, exist_ok=True)
 
     # save to different file formats
-    extensions = ['pdf', 'png', 'svg']
+    extensions = ['pdf']  # , 'png', 'svg']
     for extension in extensions:
         fpath = os.path.join(outDir, f'plot_voxel-counts.{extension}')
         plt.savefig(fpath, bbox_inches='tight')