Update speedtester.py
This commit is contained in:
+4
-3
@@ -44,7 +44,8 @@ def generate_plot_image(dates, downloads, uploads, name="speed", description="Sp
|
|||||||
|
|
||||||
dates = matplotlib.dates.date2num(dates)
|
dates = matplotlib.dates.date2num(dates)
|
||||||
fig = plt.figure(figsize=(15, 3))
|
fig = plt.figure(figsize=(15, 3))
|
||||||
plt.plot_date(dates, downloads, fmt="b-")
|
plt.plot_date(dates, downloads, linestyle='solid', color="red", linewidth=2)
|
||||||
|
plt.plot_date(dates, uploads, linestyle='dashed', color="green", linewidth=0.5)
|
||||||
plt.ylabel(description + " (Mbps)")
|
plt.ylabel(description + " (Mbps)")
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.savefig(read_config()['output_image_path'].format(name))
|
plt.savefig(read_config()['output_image_path'].format(name))
|
||||||
@@ -66,8 +67,8 @@ def generate_diff(dates, downloads, uploads):
|
|||||||
|
|
||||||
def generate_updown_plot_simple(downloads, uploads, name, description):
|
def generate_updown_plot_simple(downloads, uploads, name, description):
|
||||||
fig = plt.figure(figsize=(10, 3))
|
fig = plt.figure(figsize=(10, 3))
|
||||||
plt.plot(downloads, linestyle='dashed', color="red")
|
plt.plot(downloads, linestyle='solid', color="red", linewidth=2)
|
||||||
plt.plot(uploads, linestyle='dashed', color="green")
|
plt.plot(uploads, linestyle='dashed', color="green", linewidth=0.5)
|
||||||
plt.ylabel(description + " (Mbps)")
|
plt.ylabel(description + " (Mbps)")
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.savefig(read_config()['output_image_path'].format(name))
|
plt.savefig(read_config()['output_image_path'].format(name))
|
||||||
|
|||||||
Reference in New Issue
Block a user