Pie chart - plot functions:
The MATLAB also has a function pie which will generate a pie chart. Calling the function with the form pie (vec) draws a pie chart, by using the percentage of each element of vec of the entire (the sum). It shows these beginning from the top of the circle and going around counter-clockwise. For illustration, the first value in the vector [3 10 5 2] , 3, is 15% of the sum, 10 is 50% of the sum, and so on, as shown in figure.
>> pie ([3 10 5 2])
Also a cell array of labels can be passed to the pie function; such labels will appear rather than the percentages as shown in figure.
>> pie([3 10 5 2], {'A','B','C','D'})