Professional Documents
Culture Documents
Data Visualization: Mahesh Matha Assistant Professor Mpm001@chowgules - Ac.in
Data Visualization: Mahesh Matha Assistant Professor Mpm001@chowgules - Ac.in
Mahesh Matha
Assistant Professor
mpm001@chowgules.ac.in
• Bar Graphs
Bar Graphs
.
Bar Graphs
Problem 2 145 people were asked the question: Which is their favourite
fruit? The answers are given below. Generate the bar graph.
Fruit No of people
Apple 35
Orange 30
Banana 10
KiwiFruit 25
Blueberry 40
Grapes 5
Bar Graphs
Horizontal Bar Graphs
• Make the necessary changes for x and y axis and in barplot function set
argument “horiz” to true.
•Repeat problems 1 & 2 to draw an horizontal bar graph.
•Problem 2 Solution
Horizontal Bar Graphs
• Problem 1 Solution
Stacked Bar Graph
•It is a bar graph that is used to break down and compare parts of a whole.
•Different colours are used to illustrate the different categories in the bar.
• First: Legend’s position: left, right, center, top, topleft, topright, bottom,
bottomleft, bottomright.
•It is a bar graph that is used to break down and compare parts of a whole.
The Stacked Bar graph
Problem 2. The following data set is give below. Draw a stacked bar graph.
•In a Grouped Bar Graph, for each categorical group, there are 2 or more
bars.
•If FALSE, the columns of the height are portrayed as stacked bars and if
TRUE the columns are portrayed as juxtaposed bars.
Grouped Bar Graph
Grouped Bar Graph
•
Summary
A bar graph is a graphical display of data using bars of different heights.
A Stacked Bar Graph is a bar graph that is used to break down and compare
parts of a whole. Different colours are used to illustrate the different
categories in the bar.
In a Grouped Bar Graph, for each categorical group, there are 2 or more
bars. These bars are colour-coded to represent a particular grouping.
Questions
1) What is a bar graph?
• https://www.tutorialspoint.com/r/index.htm
Thank You
Mahesh Matha
Assistant Professor
mpm001@chowgules.ac.in