Code:
import matplotlib.pyplot as plt
from time import sleep
for i in range(100):
plt.pie([100-i,i])
sleep(1)
plt.show()
Problem with my code:
- Whenever the values of plt.pie() changes and the pie chart are plotted then execution of for loop seems to be halted and I have to close the pie chart window to resume to the execution of for loop.
What I want to do:
- plt.pie() display live changes in its values without halting for loop's execution.
thank you.
