diff --git a/pieplot.py b/pieplot.py new file mode 100644 index 0000000..1761786 --- /dev/null +++ b/pieplot.py @@ -0,0 +1,17 @@ +import matplotlib as mpl +mpl.use('svg') +import matplotlib.pyplot as plt + +users = ['alexander','christoffermadsen','jmaa','jacob'] +numbers = {} +for user in users: + number = open("log/" + user + ".log", "r").read().split("\n")[-2].split(" ")[1] + numbers[user] = number + +values = list(numbers.values()) +labels = list(numbers.keys()) + +fig1, ax1 = plt.subplots() +ax1.pie(values,labels=labels,autopct="%1.1f%%", shadow=True, startangle=90) +ax1.axis('equal') +plt.savefig("/home/christoffermadsen/public_html/img/dcavpie.svg", format="svg")