Advertisement
AyanUpadhaya

Matplotlib Pyplot Draw Pie Chart

Aug 16th, 2021
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4. y = np.array([50,80,75,25])
  5.  
  6. mylabels = ['facebook','youtube','programming','twitter']
  7. myexplode = [0,0.2,0,0]
  8.  
  9. plt.pie(y,labels = mylabels,explode = myexplode, shadow = True)
  10.  
  11. plt.title('Activities')
  12. # ~ plt.legend()
  13. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement