Skip to content

Commit

Permalink
cleaner plot labels
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Feb 3, 2025
1 parent 0807f82 commit 7bf9a80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cal_and_val/thermal/val_hev.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
label='exp',
)
ax[0].legend()
ax[0].set_ylabel(obj_fn[0].__name__)
ax[0].set_ylabel(obj_fn[0].__name__.replace('get_mod_', ''))

ax[1].plot(
sd_cal['veh']['history']['time_seconds'],
Expand All @@ -84,7 +84,7 @@
)
ax[1].legend()
ax[1].set_ylabel("Speed [m/s]")
plt.savefig(plot_save_path / f"{key}_{obj_fn[0].__name__}_cal.svg")
plt.savefig(plot_save_path / f"{key}_{obj_fn[0].__name__.replace('get_mod_', '')}_cal.svg")

for ((key, df_val), (sd_key, sd_val)) in zip(val_mod_obj.dfs.items(), sds_val_solved.items()):
if not isinstance(sd_val, dict):
Expand Down Expand Up @@ -112,7 +112,7 @@
label='exp',
)
ax[0].legend()
ax[0].set_ylabel(obj_fn[0].__name__)
ax[0].set_ylabel(obj_fn[0].__name__.replace('get_mod_', ''))

ax[1].plot(
sd_val['veh']['history']['time_seconds'],
Expand All @@ -126,7 +126,7 @@
)
ax[1].legend()
ax[1].set_ylabel("Speed [m/s]")
plt.savefig(plot_save_path / f"{key}_{obj_fn[0].__name__}_val.svg")
plt.savefig(plot_save_path / f"{key}_{obj_fn[0].__name__.replace('get_mod_', '')}_val.svg")
# %%
# function for plot formatting
def draw_error_zones(ax):
Expand Down

0 comments on commit 7bf9a80

Please sign in to comment.