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
Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Dimensions - matrix: The size and length functions in the MATLAB are used to find array dimensions. Length function returns the number of elements in the vector. The size func

Nested IF-ELSE statements: The if-else statement is used to select between the two statements. In order to select from more than two statements, the if-else statements can als

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

Script a MATLAB program which meets the following speci cations: The program expects an input of a two-variable real-valued continuous function f : R^2--> R The program is to cal

Minimum and Maximum Value The MATLAB has built-in functions for numerous statistics. For illustration, min and max to find the minimum or maximum value in a data set. >> x

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co

Customizing Plots : There are numerous ways to customize figures in the Figure Window. On clicking the Plot Tools icon will bring up the Property Editor & Plot Browser, with ma

Print an imaginary number: To print an imaginary number, the function disp will show both parts automatically: >> disp(z1)    4.0000 + 2.0000i The function fprint

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a