Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from mcstatus import MinecraftServer
- import datetime
- import random
- import matplotlib.pyplot as plt
- import time
- time_array = []
- player_count_array = []
- def main():
- with open('data.txt', 'r') as file:
- for line in file:
- line = file.readline()
- data = line.strip().split(" ")
- time = data[0]
- count = data[1].replace("\n", "")
- time_array.append(time)
- player_count_array.append(count)
- # plot
- plt.plot(time_array, player_count_array)
- plt.gcf().autofmt_xdate()
- plt.show()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement