Stacked bar chart, MATLAB Programming

A file houseafford.dat stores on its three lines years, median incomes and median home prices for a city. The dollar amounts are in thousands. For example, it might look like this:

2000 2001 2002 2003 2004 2005 2006 2007
72 74 74 77 80 83 89 93
250 270 300 310 350 390 410 380

Load the information into a matrix from a file called ‘houseafford.dat'. Create a figure with two subplots as shown below:

2392_Stacked Bar Chart.png

The left plot is a horizontal stacked bar chart to display the information shown as follows, with an appropriate title. Note: Look up the document for the bar function and use the ‘stacked' option; May set the ‘XData' property to put the years on the axis as shown in the figure.

The right plot shows the ratio of the home price to the income is called the housing affordability index. Calculate this for every year and plot it as in the figure. The x-axis should show the years (e.g., 2000-2007) as the figure below.

Get the handle to figure and change its window size to 900x400. Save your script in a .m file called ‘yourname_lab6_1.m".

Posted Date: 3/13/2013 3:39:25 AM | Location : United States







Related Discussions:- Stacked bar chart, Assignment Help, Ask Question on Stacked bar chart, Get Answer, Expert's Help, Stacked bar chart Discussions

Write discussion on Stacked bar chart
Your posts are moderated
Related Questions
design a rc phase shift oscillator for a particular frequency of oscillation and generate a sinusoidal signal

Example of Hold and legend function: Running this script will generate two individual figure windows. If there is not any other active figure window, the first, that is the ba


A filter described by the equation:    y(n) = x(n) + x(n-1) + 0.9 y(n-1) - 0.81 y(n-2) (a) Find the transfer function H(z) for the filter and find the poles and zeros of the fil

La proporción de empleados de una empresa que usan su auto para ir al trabajo es 5:16. Si hay un total de 800 empleados

Creating row Vectors: There are many ways to generate row vector variables. The most important way is to put the values which you want in the vector in square brackets, separa

-The program should run always until the user enters -1 to exit from the program. - In the main, you should ask user to input any angles in degrees (Ad) and an integer number (N).

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

Writing data to a File: The save function can be used to write a data from the matrix to the data file, or to append a data file. The format is as shown below: save filenam