Graphs – An Introduction Slide 1 Graphs An Introduction This presentation is an introduction to graphs and their uses A graph is a visual representation of a relationship between, but not restricted to, two variables. What is a graph? A graph is a visual representation of a relationship between, but not restricted to, two variables. A graph generally takes the form of a one- or two- Slide 2 dimensional figure. Although, there are threedimensional graphs available, they are usually considered too complex to understand easily. A graph commonly consists of two axes called the x-axis (horizontal) and y-axis (vertical). A graph can show Discrete or Continuous data types. A graph generally takes the form of a two-dimensional figure. Although, there are three-dimensional graphs available, they are usually considered too complex to understand easily. A graph commonly consists of two axes called the x-axis (horizontal) and y-axis (vertical). Data types determines which graph to use. There are two types of data that can be shown by using a graph, Discrete and Continuous Discrete or Continous Slide 3 Discrete: Data that can be separated by some interval, for example: Recording the shoe sizes of a class – Bar graph Continuous: When data collected is continuous, for example: Recording temperature – Line graph There are two types of data that can be shown by using a graph, Discrete and Continuous. To show continuous data effectively you need to be able to join the points on the graph, you would then be able to interpolate the results of points not recorded. Continuous data is usually shown in the form of a line graph. Discrete data is data that is discrete and separate and can be counted, it is not continuous. Discrete data is usually shown by using a bar, column or pictograph. ~1~ Slide 4 20 Y – axis This is a graph 25 Y – axis label Scale or Increments Graphs – An Introduction 10 All graphs (except Pie Chart) have common elements: Axis x and y (also z in 3D graphs) Axis labels A title Scales or Increments Can represent negative values 5 Origin – does not always have to start at 0,0 15 X-axis -20 10 -10 -5 20 30 40 50 X-axis label Scale or Increments -10 A graph consists of basic elements. ALL graphs should have a TITLE All bar, line and scatter graphs should have axis and axis labels Scales are placed on the axis (they resemble the markings on a ruler). On the x-axis, to the right of the origin, the numbers are positive and increase the further they are away from the origin. On the left of the origin the numbers are negative, and decrease the further away they are from the origin. Similarly on the y-axis, above the origin the numbers are positive and increase as they go up, the numbers are negative below the origin and decrease as they go lower. The interval of the scale is the amount of space along the axis from one mark to the next. If the range of the scale is small, the general rule is to take the range of the scale and divide it by 10. Make this your interval. For ranges that are larger, the interval is typically 5, 10, 100, 500, 1,000, etc. Use numbers that divide evenly into 100, 1,000 or their multiples in order to provide a graph that is easy to understand. The origin of the X and Y axis do not have to begin at the same number, and you do not have to use the same scale, but the values on the scale should remain the same for that axis. ~2~ Graphs – An Introduction 25 and a horizontal line from the y-axis 20 the point at which they meet gives us the co-ordinate 15 Co-ordinates Y – axis If we draw a vertical line from any point on the x-axis A (3,15) B (-4,10) 10 Slide 5 5 -5 -4 -3 -2 1 -1 2 3 -5 4 5 X-axis -10 -15 C (-5,-15) Back If we draw a line from a point on the xaxis, either vertically up or down, and a horizontal line, either left or right, from the y-axis, the point at which they cross gives us the co-ordinate of that point. So, point A has a co-ordinate of 3,15 since the vertical line meets the x-axis at 3 and the horizontal line meets the y-axis at 15 At point B, the vertical line meets the xaxis at -4 and the horizontal line meets the y-axis at 10, therefore it’s coordinates are -4, 10 Similarly with point C, the co-ordinates are both in the negative sector so it’s coordinates are -5, -15 Types of Graphs Although these are the four basic types of graphs, you should be aware that there are many more specialised graph types. Four basic types of graph or chart Line Pie Bar Scatter Slide 6 Creating a Line Graph Line Graphs A good method of showing the relationship between two variables Slide 7 Pulse - Beats per minute Exercise and Pulse Rate 200 150 Al a n - 28 yea r ol d former a thl ete 100 A line graph is commonly used to show the trend of data, such as temperature over a period of time. Ja net - 38 yea r ol d s ecreta ry 50 0 0 30 60 90 120 Time in minutes Back ~3~ Graphs – An Introduction Bar graphs should be used when you are showing segments of information. A bar graph can have either horizontal or vertical bars (Vertical bar graphs are sometimes called Column charts). The important point to note about bar graphs is their bar length or height—the greater their length or height, the greater their value When drawing bar graphs, draw a vertical or horizontal bar for each category. The height or length of the bar will represent the value of the variable. Select an arbitrary but consistent width for each bar as well. Bar Chart / Graph Used to compare values in a category or between categories. Slide 8 Ca er ph i lly Ca m em be rt Ch ed Ch da ee r se sp re ad Ch es Co hi tta re ge ch ee s e Da ni Do sh ub bl le ue G lo uc es te r The graph shown here makes a visual comparison of the fat content of types of cheese Ed am Fat / 100g total Fat content of cheeses 40 35 30 25 20 15 10 5 0 Cheeses This graph has been turned on it’s side, the information shown here could also have been shown in the form of a line graph. It is important to look at the data before deciding how to draw the graph, if the number data on the x-axis is large, then turn the paper to landscape format to facilitate more increments. Bar Chart / Graph Can be useful to study trends over time Daily Temperature Fluctuation 00:00 Time (24 hr) 20:00 Slide 9 16:00 12:00 08:00 04:00 00:00 -4 -2 0 2 4 6 8 10 12 Temperature (o C) Creating a Bar Graph Bar Chart / Graph Multiple (or group) bar graphs compare relationships of closely related sets Slide 10 Back Here groups of data have been used for comparison. The y-axis label/ scale must of course be common to all groups. The double (or group) vertical bar graph is a effective means of comparing sets of data about the same places or items. This type of vertical bar graph gives two or more pieces of information for each item on the x-axis instead of just one. This allows you to make direct comparisons on the same graph. However, if a group vertical bar graph has too many sets of data, the graph becomes cluttered and it can be confusing to read. ~4~ Graphs – An Introduction Creating Pie Charts Pie Charts A pie chart is used to show how a part of something relates to the whole. This kind of graph is particularly suited to showing percentages Slide 11 Red 7% Pie charts are particularly useful to show the percentage of sectors of a whole. Survey of female hair colour Multicoloured 7% Blonde 47% Brunette 39% Back Drawing a scatter graph is similar to drawing a line graph in that co-ordinates are used to plot the points. There are usually more points to be plotted in a scatter graph and the points can be in groups, therefore it is not possible to draw a line through all of the points.A scatter graph shows how much correlation there is between two variables that you suspect may be linked for instance height and weight as shown here: It is sometimes useful to draw a “line of best fit” to show the trend Slide 12 Drawing a scatter graph is similar to drawing a line A scatter graph shows graph in that co-ordinates how much correlation are used to plot the there is between two points. There variables that are you usually suspect mayto bebe linked for more points plotted height andand the ininstance a scatter graph weight as shown here: points can be in groups, therefore it is not possible It is sometimes useful to todraw draw a lineofthrough all a “line best fit” to the trend ofshow the points. Weight (kg) Scatter Graph Line of best fit Height (cm) Back A good graph: Summary A good graph: Slide 13 Accurately shows the data Grabs the reader's attention Has a title and labels Is simple and uncluttered Clearly shows any trends or differences in the data Is visually accurate (i.e., if one data value is 25 and another 50, then 50 should appear to be twice the size of 25). • • • • • Accurately shows the data Grabs the reader's attention Has a title and labels Is simple and uncluttered Clearly shows any trends or differences in the data • Is visually accurate (i.e., if one data value is 25 and another 50, then 50 should appear to be twice the size of 25). ~5~