From 0c5c285b13d5364b078a648a398e092b315ff73f Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 8 Nov 2023 11:52:51 +0000 Subject: [PATCH 1/2] indent fix --- process/io/plot_scans.py | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/process/io/plot_scans.py b/process/io/plot_scans.py index bc2da87e..ba9a22cb 100644 --- a/process/io/plot_scans.py +++ b/process/io/plot_scans.py @@ -837,9 +837,6 @@ def main(args=None): flat_output_z = output_contour_z.flatten() flat_output_z.sort() - print(x_contour) - print(y_contour) - print(output_contour_z) plt.contourf( x_contour, y_contour, @@ -870,7 +867,6 @@ def main(args=None): conv_ij ): # conv_j is an array element containing the converged scan numbers # Scanned variables - print(conv_j) scan_1_var_array = np.zeros(len(conv_j)) scan_2_var_array = np.zeros(len(conv_j)) output_array = np.zeros(len(conv_j)) @@ -889,20 +885,20 @@ def main(args=None): # Plot the graph plt.plot(scan_2_var_array, output_array, "--o", label=labl) - plt.grid(True) - plt.ylabel(labels[output_name], fontsize=axis_font_size) - plt.xlabel(labels[scan_2_var_name], fontsize=axis_font_size) - plt.legend(loc="best", fontsize=legend_size) - plt.xticks(size=axis_tick_size) - plt.yticks(size=axis_tick_size) - plt.tight_layout() - plt.savefig( - f"{args.outputdir}/scan_{output_name}_vs_{scan_var_name}_{scan_2_var_name}.{save_format}" - ) + plt.grid(True) + plt.ylabel(labels[output_name], fontsize=axis_font_size) + plt.xlabel(labels[scan_2_var_name], fontsize=axis_font_size) + plt.legend(loc="best", fontsize=legend_size) + plt.xticks(size=10) + plt.yticks(size=axis_tick_size) + plt.tight_layout() + plt.savefig( + f"{args.outputdir}/scan_{output_name}_vs_{scan_var_name}_{scan_2_var_name}.{save_format}" + ) - # Display plot (used in Jupyter notebooks) - plt.show() - plt.clf() + # Display plot (used in Jupyter notebooks) + plt.show() + plt.clf() if __name__ == "__main__": From 8159f193a5c1502d2c030d11696144f13fc8a5e5 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 8 Nov 2023 11:53:39 +0000 Subject: [PATCH 2/2] axis tick size --- process/io/plot_scans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/io/plot_scans.py b/process/io/plot_scans.py index ba9a22cb..aebccad6 100644 --- a/process/io/plot_scans.py +++ b/process/io/plot_scans.py @@ -889,7 +889,7 @@ def main(args=None): plt.ylabel(labels[output_name], fontsize=axis_font_size) plt.xlabel(labels[scan_2_var_name], fontsize=axis_font_size) plt.legend(loc="best", fontsize=legend_size) - plt.xticks(size=10) + plt.xticks(size=axis_tick_size) plt.yticks(size=axis_tick_size) plt.tight_layout() plt.savefig(