fig7_spectra( paths_sim[short_name], fig, ax, Fr, c, t_start=tmin, run_nb=run_nb, n_colors=len(df), ) if __name__ == "__main__": sns.set_palette("cubehelix", 3) matplotlib_rc(11) path_fig = exit_if_figure_exists(__file__) set_figsize(7, 3) fig, ax = pl.subplots(1, 2, sharex=True, sharey=True) df_w = load_df("df_w") df_3840 = df_w[df_w["$n$"] == 3840] df_7680 = df_w[df_w["$n$"] == 7680] sns.set_palette("cubehelix", 5) plot_df(df_3840, fig, ax[0]) sns.set_palette("cubehelix", 3) plot_df(df_7680, fig, ax[1]) for ax1 in ax: ax1.set_ylim(1e-2, 1e2) ax1.set_xlim(2e-1, 5e2)
ax.set_xlim([0.0, None]) ax.set_ylim([0.0, None]) if normalized: ax.set_xlabel("$t (\epsilon/L_f^2)^{1/3}$") # ax.set_ylabel("$E/E_f$") ax.set_ylabel("$E/(\epsilon L_f)^{2/3}$") # ax.grid(True, axis='y', linestyle=':') else: ax.set_xlabel("$t$") ax.set_ylabel("$E$") def get_legend_and_paths(c_list, nh_list): keys = [] legend = [] for c in c_list: for nh in nh_list: keys.append("c{}nh{}".format(c, nh)) legend.append("c={}, n={}".format(c, nh)) return legend, [paths_sim["noise_" + k + "Buinf"] for k in keys] if __name__ == "__main__": matplotlib_rc(fontsize) path_fig = exit_if_figure_exists(__file__, override_exit=False) set_figsize(5.12, 3.0) fig1_plot_all(paths_sim) pl.savefig(path_fig) pl.savefig(path_fig.replace(".png", ".pdf"))