Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from matplotlib import pyplot as plt
- from random import randint
- print(plt.style.available)
- plt.style.use('fivethirtyeight')
- x_values = [1,2,3,4,5]
- download_speed = [randint(60, 800) for i in range(5)]
- upload_speed = [randint(20, 200) for i in range(5)]
- average_speed = [randint(100, 600) for i in range(5)]
- plt.plot(x_values, download_speed, color="#485FD4", linewidth=2, linestyle='--', marker='o', label="Download Speed")
- plt.plot(x_values, upload_speed, color="#D4BD48", linewidth=2, marker='o', label="Upload Speed")
- plt.plot(x_values, average_speed, color="#48D48E", linewidth=2, marker='o', label="Average Speed")
- plt.xlabel("Time")
- plt.ylabel("Speed")
- plt.legend()
- # plt.legend(loc='lower center')
- # plt.legend(loc=(0.2, 0.4))
- plt.savefig('test_plot.png')
- # plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement