Skip to content

Commit

Permalink
round battery left to 1dp
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed Jul 9, 2024
1 parent 719584a commit 6b61462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pilot_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def battery_plots(combined_nav_file, out_dir):
ax.axvline(recover_3, color="red")
ax.axvline(recover_5, color="red")
ax.axvspan(recoveries[0], recoveries[1], alpha=0.1, color='red')
v_string = f"Voltage: {df['Voltage'].values[-1]} V\n{losses[0]}-{losses[1]} V/day\nrecover {r_string}"
v_string = f"Voltage: {np.round(df['Voltage'].values[-1], 1)} V\n{losses[0]}-{losses[1]} V/day\nrecover {r_string}"
ax.text(0.05, 0.08, v_string, transform=ax.transAxes)
ax.grid()
ax.set(ylabel="Voltage (v)", title=title)
Expand Down

0 comments on commit 6b61462

Please sign in to comment.