Bar Charts Bar charts are graphs of rectangular bars with the length of the bars proportional to the value represented. Bar charts can be used to represent discrete data (data that changes over discrete intervals, not continuously). Bar charts are useful for showing trends over time. Bar charts are often more visually appealing than line graphs
Example w3schools.com Browser survey of their visitors: Month/Year Internet Explorer FirefoxChromeSafari Jan %36.4%1.9% Jan %45.5%3.9%3.0% Jan %46.3%10.8%3.7% Jan %42.8%23.8%4.0% Jan %37.1%35.3%4.3% Jan %30.2%48.4%4.2%
Example >> Explorer = [54.7; 44.8; 36.2; 26.6; 20.1; 14.3]; >> Firefox = [36.4; 45.5; 46.3; 42.8; 37.1; 30.2]; >> Chrome = [0; 3.9; 10.8; 23.8; 35.3; 48.4]; >> Safari = [1.9; 3.0; 3.7; 4.0; 4.3; 4.2]; >> Browser = [Explorer Firefox Chrome Safari] Browser = % browser is a 6 x 4 matrix (2-d array) of values. Each column represents the data from a different browser.
Example >> Year = [2008; 2009; 2010; 2011; 2012; 2013]; >> bar(Year,Browser); >> legend('Explorer','Firefox','Chrome','Safari') >> xlabel('Year'); ylabel('Percent of Users'); title('Browser Usage Statistics');