bar()

Need to plot power consumption of a different circuits A-C grouped per year (three years 2010-2012)

Create a vector to hold years (horizontal grouping):

X=[2010 2011 2012];                         % holds years (grouping variable)

Create three vectors, each will hold the consumption of each converter throughout time:

Y(1,:) = [600 800 1800] ;                   % consumption of three circuits in 2010
Y(2,:) = [680 720 1500] ;                   % consumption of three circuits in 2011
Y(3,:) = [700 600 1400] ;                   % consumption of three circuits in 2012
bar(X,Y) will plot this

stacked bars

type bar(X,Y,'stacked');

%COMMENTS%


This topic: Main > MatlabNotes > Bar
Topic revision: r2 - 2014-02-18 - KonstantinosPapastergiou
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback