Figure width fix

master
Nixellion 2020-06-23 23:52:57 +03:00
parent 18e7d310f8
commit 692b1f9cf7
2 changed files with 7 additions and 1 deletions

3
.gitignore vendored
View File

@ -129,4 +129,5 @@ dmypy.json
# Pyre type checker # Pyre type checker
.pyre/ .pyre/
.idea/ .idea/
data/database.db

View File

@ -28,6 +28,7 @@ def generate_plot_image(dates, downloads, uploads):
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
dates = matplotlib.dates.date2num(dates) dates = matplotlib.dates.date2num(dates)
fig = plt.figure(figsize=(12,3))
plt.plot_date(dates, downloads, fmt="b-") plt.plot_date(dates, downloads, fmt="b-")
plt.ylabel('Download Speed Mbps') plt.ylabel('Download Speed Mbps')
plt.tight_layout() plt.tight_layout()
@ -49,6 +50,10 @@ if __name__ == "__main__":
This script will run a few speed tests, calculate average upload and download speeds and record them into database. This script will run a few speed tests, calculate average upload and download speeds and record them into database.
Once finished it will also generate an image with graph plotted. Once finished it will also generate an image with graph plotted.
''' '''
# generate_plot_image(*gather_data())
# import sys
# sys.exit()
from random import uniform from random import uniform
try: try:
import speedtest import speedtest