![]() The proportionate percentage is displayed inside the respective wedge with the help of autopct parameter which is set to %1.2f%. The format string will be fmt%pct.įollowing code uses the pie() function to display the pie chart of the list of students enrolled for various computer language courses. The label will be placed inside the wedge. ![]() String, used to label the wedges with their numeric value. If None, will use the colors in the currently active cycle. A sequence of strings providing the labels for each wedge.Ī sequence of matplotlibcolorargs through which the pie chart will cycle. Parametersįollowing table lists down the parameters foe a pie chart − x The pie chart looks best if the figure and axes are square, or the Axes aspect is equal. Theresulting pie will have an empty wedge of size 1 - sum(x). If sum(x)< 1, then the values of x give the fractional area directly and the array will not be normalized. The fractional area of each wedge is given by x/sum(x). Matplotlib API has a pie() function that generates a pie diagram representing data in an array. The data points in a pie chart are shown as a percentage of the whole pie. Pie charts show the size of items (called wedge) in one data series, proportional to the sum of the items. A Pie Chart can only display one series of data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |