Skip to content

Commit

Permalink
Fix #350: [Sim] Tweaks to plot title
Browse files Browse the repository at this point in the history
  • Loading branch information
trentmc committed Dec 17, 2023
1 parent d3029a7 commit d759284
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pdr_backend/sim/sim_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ def _plot(self, i, N):
N = len(y0)
x = list(range(0, N))
ax0.plot(x, y0, "g-")
ax0.set_title("Trading profit vs time", fontsize=FONTSIZE, fontweight="bold")
ax0.set_title(
f"Trading profit vs time. Current: ${y0[-1]:.2f}",
fontsize=FONTSIZE, fontweight="bold",
)
ax0.set_xlabel("time", fontsize=FONTSIZE)
ax0.set_ylabel("trading profit (USD)", fontsize=FONTSIZE)

Expand All @@ -259,7 +262,8 @@ def _plot(self, i, N):
ax1.fill_between(x, y1_l, y1_u, color="b", alpha=0.15)
now_s = f"{y1_est[-1]:.2f}% [{y1_l[-1]:.2f}%, {y1_u[-1]:.2f}%]"
ax1.set_title(
f"% correct vs time. {now_s}", fontsize=FONTSIZE, fontweight="bold"
f"% correct vs time. Current: {now_s}",
fontsize=FONTSIZE, fontweight="bold",
)
ax1.set_xlabel("time", fontsize=FONTSIZE)
ax1.set_ylabel("% correct", fontsize=FONTSIZE)
Expand Down

0 comments on commit d759284

Please sign in to comment.