Summarising data using bar charts

December 12th, 2009

A bar graph is a frequently used type of display that compares counts, frequencies, totals or other summary measures for a series of categories, e.g. sales in different market sectors or in quarters in a financial year. The bar graph can be laid out with the categories either on the vertical or horizontal axis of the display – depending on whether we consider making a vertical or horizontal comparison is easier for interpreting the graph. Read the rest of this entry »

Graph Examples from Visualizing Data by William Cleveland

November 12th, 2009

The trellis graphics approach was pioneered by various statistical researchers and the ideas are used extensively in the book “Visualizing Data” by William Cleveland. There are various resources on the website for trellis graphics including S code for creating the majority of the graphs that appear in the book. Inspired by efforts on the Learning R blog to recreate the examples from Deepayan Sarkar’s book on lattice using ggplot2 I have decide to undertake a similar exercise based on the scripts that have been made available for creating the graphs from the book. Read the rest of this entry »

Using Faceting in ggplot2 to create Trellis-like Plots

November 9th, 2009

One of the main strengths of the Trellis graphics paradigm is the use of panelling to divide data into subsets to investigate whether patterns are consistent as the conditioning variables change. In the ggplot2 package the terminology for specifying these separate panels is faceting and can be used to create similar displays. Read the rest of this entry »

Investigation the relationship between two variables using a scatter plot

October 13th, 2009

The relationship between two variables can be visually represented using a scatter plot and will provide some insight into the correlation between the variables and possible models to describe the relationship. There are different ways to produce scatter plots in R making use of either the base graphics system, the lattice graphics library, ggplot2 or other packages. Read the rest of this entry »

Cleveland’s Dot Plots for Plotting Data

September 26th, 2009

The dot plot was introduced by Cleveland to provide a powerful visual display to compare groups of data and a function for this type of graphical display is available in the lattice library for R. Data is divided into groups and dots are used to indicate the value of a particular variable with the groups arranged either horizontally or vertically to allow a visual comparison of the distributions for the groups. Read the rest of this entry »

Lattice Graphics Book – Examples Website

September 15th, 2009

The author of the lattice graphics library has written a book describing using lattice graphics which provides a large number of examples. A website has been created that shows the graphs using different colour schemes and shows the code that has been used to construct the plots. Read the rest of this entry »

A Gallery of Graphs produced using R

September 12th, 2009

The R environment for Statistical Analysis has strong facilities for producing high quality graphical output. There are many books and electronic documents that demonstrate examples of effective ways to display data graphically. To get an feel for the range of display that could be used it is worthwhile visiting the R Graph Gallery. Read the rest of this entry »

Box and Whisker Plots for Summarising Data

August 11th, 2009

We have considered using a histogram to summarise univariate data but there are other types of plot such as the box and whisker plot that can be used summarised univariate data. The box and whisker plot is a graphical method for summarising numerical data based on a five-number summary. These five numbers are the minimum, lower quartile, median, upper quartile and maximum value. Read the rest of this entry »

Using Histograms to Summarise Data

June 8th, 2009

It is not only possible to use tabular displays to summarise a data set and we will often be interested in using a graphical display as this might be a more effective way to visualise our data rather than using statistics such as the mean or standard deviation. Read the rest of this entry »

Statistics Books