Pie chart - plot functions, MATLAB in Mathematics

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.

370_Pie chart.png

>> 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.

2180_Pie chart1.png

   >> pie([3 10 5 2], {'A','B','C','D'})

Posted Date: 10/22/2012 1:50:19 AM | Location : United States







Related Discussions:- Pie chart - plot functions, Assignment Help, Ask Question on Pie chart - plot functions, Get Answer, Expert's Help, Pie chart - plot functions Discussions

Write discussion on Pie chart - plot functions
Your posts are moderated
Related Questions
Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Functions to create special matrices: The MATLAB also has various functions which create special matrices. For illustration, the zeros function generates a matrix of all zeros

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc

Blanks function: The blanks function will generate a string consisting of n blank characters-that are kind of hard to see here! Though, in a MATLAB if the mouse is moved to hi


Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

Function xlsread - file function: The function xlsread will read from the spreadsheet file. For illustration, to read from file just generated: >> ssnums = xlsread('ranexc

Built in recursive function in MATLAB: We have seen that the built-in function in MATLAB to compute factorials, termed as the factorial and we know how to implement the iterat

Matrix of Plots: The other function which is very useful with any type of plot is subplot that creates a matrix of plots in the present Figure Window. The three arguments are

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which