makes plot with labels

This commit is contained in:
Beale John Henry
2024-01-31 09:25:27 +01:00
parent 3c92e69736
commit c3e3101997

View File

@@ -340,16 +340,16 @@ def plot_indexed_std( stats_df, ax1, ax2 ):
ax2.tick_params(axis='y', labelcolor=color) ax2.tick_params(axis='y', labelcolor=color)
# std_a plot # std_a plot
color = "lightsteelblue" color = "turquoise"
ax2.plot(stats_df.clen, stats_df.std_a, color=color) ax2.plot(stats_df.clen, stats_df.std_a, color=color, label="a" )
# std_b plot # std_b plot
color = "cornflowerblue" color = "deepskyblue"
ax2.plot(stats_df.clen, stats_df.std_b, color=color) ax2.plot(stats_df.clen, stats_df.std_b, color=color, label="b" )
# std_c plot # std_c plot
color = "royalblue" color = "royalblue"
ax2.plot(stats_df.clen, stats_df.std_c, color=color) ax2.plot(stats_df.clen, stats_df.std_c, color=color, label="c" )
def plot_indexed_std_alpha_beta_gamma( stats_df, ax1, ax2 ): def plot_indexed_std_alpha_beta_gamma( stats_df, ax1, ax2 ):
@@ -366,16 +366,16 @@ def plot_indexed_std_alpha_beta_gamma( stats_df, ax1, ax2 ):
ax2.tick_params(axis='y', labelcolor=color) ax2.tick_params(axis='y', labelcolor=color)
# std_alpha plot # std_alpha plot
color = "limegreen" color = "yellow"
ax2.plot(stats_df.clen, stats_df.std_alpha, color=color) ax2.plot(stats_df.clen, stats_df.std_alpha, color=color, label="alpha" )
# std_beta plot # std_beta plot
color = "darkgreen" color = "green"
ax2.plot(stats_df.clen, stats_df.std_beta, color=color) ax2.plot(stats_df.clen, stats_df.std_beta, color=color, label="beta" )
# std_gamma plot # std_gamma plot
color = "green" color = "darkolivegreen"
ax2.plot(stats_df.clen, stats_df.std_gamma, color=color) ax2.plot(stats_df.clen, stats_df.std_gamma, color=color, label="gamma" )
def scan( cwd, lst, sample, lab6_geom_file, centre_clen, cell_file, threshold, step_size ): def scan( cwd, lst, sample, lab6_geom_file, centre_clen, cell_file, threshold, step_size ):
@@ -447,6 +447,7 @@ def scrub_scan( scan_top_dir, scan ):
plot_indexed_std(stats_df, ax1, ax2) plot_indexed_std(stats_df, ax1, ax2)
plot_indexed_std_alpha_beta_gamma(stats_df, ax3, ax4) plot_indexed_std_alpha_beta_gamma(stats_df, ax3, ax4)
fig.legend(loc="upper center")
fig.tight_layout() fig.tight_layout()
plt.savefig("{0}.png".format(scan)) plt.savefig("{0}.png".format(scan))
@@ -530,3 +531,4 @@ if __name__ == "__main__":
print( "top working directory = {0}".format( cwd ) ) print( "top working directory = {0}".format( cwd ) )
main( cwd, args.lst, args.sample, args.geom, args.central_distance, args.cell_file, threshold ) main( cwd, args.lst, args.sample, args.geom, args.central_distance, args.cell_file, threshold )