Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2.  
  3. # config
  4. labels = 'Low','Moderate','High','Very High'
  5. colors = ['#0909A2','#861886','#CB0083','#DE0000']
  6.  
  7. # data
  8. n = 133
  9. paranoid = [36/n, 25/n, 34/n, 38/n]
  10. schizoid = [25/n, 37/n, 49/n, 22/n]
  11. schizotypal = [22/n, 43/n, 43/n, 25/n]
  12. antisocial = [0/n, 133/n, 0/n, 0/n]
  13. borderline = [54/n, 27/n, 39/n, 13/n]
  14. histrionic = [43/n, 60/n, 22/n, 8/n]
  15. narcissistic = [15/n, 45/n, 51/n, 22/n]
  16. avoidant = [42/n, 26/n, 36/n, 29/n]
  17. dependent = [70/n, 33/n, 19/n, 11/n]
  18. obsessiveCompulsive = [39/n, 38/n, 24/n, 32/n]
  19. count = 133
  20.  
  21. # plot
  22. plt.pie(obsessiveCompulsive, explode=None, labels=labels, colors=colors, autopct='%1.1f%%', shadow=False, startangle=90)
  23. plt.title('Obsessive-Compulsive Rating | /pol | 22.08.2016')
  24. plt.axis('equal')
  25. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement