Donut Chart In Python Matplotlib
Matplotlib Tutorials Playlist - https://www.youtube.com/playlist?list=PLy3lFw0OTlutlv4IJGOhp7kelohxZnO7- 'Data Analytics Project For Resume' - .... * will be uploaded soon * .... ------------------------------------------------------------- !! Donut Chart - Python Matplotlib !! Donut chart is a modified Pie chart, with an area from center cut out. Step 1) First, drawing a pie plot, using Matplotlib library The data is taken from the variable 'A' .... labels are given as 'Churned' & 'Not Churned' ... ... color is given to each label 'orange' & 'lime' ... startangle means the angle for slicing, set as 50 ... ... shadow is True means it will drop some shadow of the chart ... radius of the circle is set as 2 ... ... explode is used to cut the slice out of the figure ... ... autopct is used to show the % on the chart upto required decimal points ... ... pctdistance is given for distance of % from the center Step 2) Second, using plt.Circle...we will create a circle and save it in the variable name 'circle' ... ... putting (0,0) by default ... 1 is radius of circle ... and color of circle is white ... ... plt.gcf() is used to get the current figure ... and we are saving it in variable 'c' Step 3) Third, we will add the 'circle' at the center of pie chart ... using gca().add_artist() ... We have given the title to the chart using plt.title() ... plt.show() - To show the chart ------------------------------------------ Buy 'Data Analyst - Self Study Material' ( Rs.450 ) - https://rzp.io/l/dslstudymaterial ------------------------------------------- Contact Mail Id : [email protected] ------------------------------------------ 🇮🇳 DATA SCIENCE LOVERS 🧡💛💚 ------------------------------------------- You must check our projects videos : Project 8 - https://youtu.be/b7Kd0fLwgO4 Project 7 - https://youtu.be/AO5uhxa1R84 Project 6 - https://youtu.be/e1zKFSrKeLs Project 5 - https://youtu.be/q-Omt6LgRLc Project 4 - https://youtu.be/89eYAAPyRfo Project 3 - https://youtu.be/GyUbo45mVSE Project 2 - https://www.youtube.com/watch?v=fhiUl7f5DnI Project 1 - https://youtu.be/4hYOkHijtNw -------------------------------------------- #python #matplotlib #donut
Download
0 formatsNo download links available.