def plot_reading(hx, tare_weight, full_weight):
    while True:
        current_weight = hx.get_weight_mean(20)
        remaining_weight = max(0, (current_weight - tare_weight))
        labels = ['Remaining', 'Eaten']
        sizes = [remaining_weight, max(0, (full_weight - remaining_weight))]
        colors = ['sandybrown', 'lightgrey']
        explode = (0, 0.1)
        title_font = {'color': 'blue', 'weight': 'bold', 'size': 30}
        label_font = {'color': 'black', 'weight': 'normal', 'size': 20}
        h = plt.pie(sizes, explode=explode, labels=labels, colors=colors, autopct='%1.1f%%', shadow=True, startangle=180, textprops=label_font)
        plt.title('Pi Day Pie Pie Chart', title_font)
        plt.plot()
        plt.draw()
        plt.pause(1)
        plt.clf()
def plot_reading(hx, tare_weight, full_weight):
    while True:
        current_weight = hx.get_weight_mean(20)
        remaining_weight = max(0, (current_weight - tare_weight))
        labels = ['Remaining', 'Eaten']
        sizes = [remaining_weight, max(0, (full_weight - remaining_weight))]
        colors = ['sandybrown', 'lightgrey']
        explode = (0, 0.1)
        title_font = {'color': 'blue', 'weight': 'bold', 'size': 30}
        label_font = {'color': 'black', 'weight': 'normal', 'size': 20}
        h = plt.pie(sizes, explode=explode, labels=labels, colors=colors, autopct='%1.1f%%', shadow=True, startangle=180, textprops=label_font)
        plt.title('Pi Day Pie Pie Chart', title_font)
        plt.plot()
        plt.draw()
        plt.pause(1)
        plt.clf()