For Programmers: Free Programming Magazines  


Home > Archive > Matlab > November 2005 > stacked bars









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author stacked bars
Max

2005-11-29, 7:06 pm

Hello everybody,
I tried to create a chart as in Excell, with bars stacked columns,
which compares the contribution of each values to a total across
categories:
-----------------------------
axes(handles.axes1);
bar(res.monthly(:,1),'stacked','r');
hold on
bar(res.monthly(:,2),'stacked','c');
bar(res.monthly(:,4),'stacked','y');
bar(res.monthly(:,3),'stacked','g');

set(gca,'XLim',[0 13],'Layer','top')
title 'consumption per floor square meter';
xlabel('month');
ylabel('kwh/m2');
grid on;
---------------------------------------------
I wanted to affect a defined colour to each categorie, that's the
cause of my 4 first lines. and I suppose that is the cause of my
troubles, the 4 columns are superposed and not stacked.
does Anyone have an issue to resolve my problem??
thank for reading
max
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com