plot battery levels
This commit is contained in:
14
scripts/battery_plot.py
Normal file
14
scripts/battery_plot.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# Given data
|
||||
battery_level = [89.0, 89.0, 89.0, 89.0, 89.0, 89.0, 90.0, 90.0, 90.0, 83.0, 86.0, 45.0, 45.0]
|
||||
battery_voltage = [4.145, 4.145, 4.145, 4.145, 4.145, 4.145, 4.145, 4.133, 4.133, 4.029, 4.107, 3.736, 3.732]
|
||||
|
||||
# Plotting
|
||||
plt.figure(figsize=(10, 6))
|
||||
plt.plot(battery_level, battery_voltage, marker='o', linestyle='-', color='b')
|
||||
plt.title('Battery Level vs Battery Voltage')
|
||||
plt.xlabel('Battery Level (%)')
|
||||
plt.ylabel('Battery Voltage (V)')
|
||||
plt.grid(True)
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user