Advertisement
KodingKid

Creating 3 Pie Charts in Python

Jun 8th, 2021
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. x = np.array([33, 27, 22, 18]) #33% 27% 22% 18%
  4. y = np.array([36, 24, 19, 21]) #36% 24% 19% 21%
  5. z = np.array([31, 29, 26, 14]) #31% 29% 26% 14%
  6. plt.pie(x) #shows variable x
  7. plt.show()
  8. plt.pie(y) #shows variable y
  9. plt.show()
  10. plt.pie(z) #shows variable z
  11. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement