Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tov_type count
- Inpatient 7
- Office Visit 6
- Appointment Schedule 1
- Allergy Sheet 1
- def addPieGraph():
- # Create a list of colors (from iWantHue)
- colors = ["#6287da","#72ac5c","#8653aa","#bb7438","#b94b75"]
- # Create a pie chart
- plt.pie(
- # using data total)arrests
- custpref['cnt'],
- # with the labels being officer names
- labels=custpref['tov_type'],
- # with no shadows
- shadow=False,
- # with colors
- colors=colors,
- # with the start angle at 90%
- startangle=90,
- )
- # View the plot drop above
- plt.axis('equal')
- # View the plot
- plt.tight_layout()
- plt.title("Top 5 Visit Types Total = 15 Visits")
- plt.savefig(r"PieChart.png",bbox_inches="tight")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement