"""Python Script Template.""" import pandas as pd import matplotlib.pyplot as plt from exps.plotting import plot_df_key, set_figure_params from exps.environments.utilities import get_color, get_linestyle df = pd.read_pickle("two_state_deterministic_results.pkl") set_figure_params(serif=True) fig, axes = plt.subplots(ncols=1, nrows=1) plot_df_key( df=df, axes=axes, key="value_evaluation", get_color=get_color, get_linestyle=get_linestyle, ) plt.xlabel("Episode") plt.ylabel("Reward") plt.title(f"Two-State-Deterministic") # plt.legend(loc="best", frameon=False) plt.legend(bbox_to_anchor=(0.52, 0.3), loc="lower left", frameon=False, ncol=2) plt.savefig("two_state_deterministic_results.pdf", bbox_inches="tight")
get_color, get_linestyle, ) import matplotlib.pyplot as plt import seaborn as sns palette = sns.color_palette(n_colors=10) args = parse_arguments() df = pd.read_pickle("algorithm_results.pkl") df = df[df.name != "Mini-Batch-REPS"] df = df[df.name != "Biased-REPS"] df = df[df.name != "SaddleQREPS"] set_figure_params(serif=True, fontsize=12) fig, axes = plt.subplots(ncols=1, nrows=1) fig.set_size_inches(6.75 / 2, 2.0) plot_df_key( df=df, axes=axes, key="value_evaluation", get_color=get_color, get_linestyle=get_linestyle, ) plt.xlabel("Episode") plt.ylabel("Average Reward") plt.title(r"Min-Max Optimization")