Posts Tagged ‘ ggplot2 ’

ggplot2 Tutorial: Scatterplots in a Series of Small Multiples

January 11, 2010
By

It took several months after learning about ggplot2 before I gave it a try myself.  I was apprehensive about learning a new graphics system with a new set of commands.  Thing is, if you've ever used plot() in R, you already know how to use much of the functionality in ggplot2!  In this tutorial I want to show you...

Read more »

Data Visualization and R Programming Books (Updated)

January 7, 2010
By

Download "Getting Started with the Social Media Analytics Research Toolkit" (pdf, 1.25 megabytes) Download the Social Media Analytics Research Toolkit Download Code Like A Pirate - The #rstats Appliance from the SUSE Gallery Disclosure As you probably ...

Read more »

New Features in ggplot2 0.8.5

January 6, 2010
By

Learning R blog details some of the new features in the latest update to ggplot2. The latest version includes functions to make it easier to change axis and legend labels, as well as a function to easily set the limits of the plot display outside the range of the data. Be sure to check back next week - I'm putting...

Read more »

The Grammar of Graphics: ggplot2 package

December 14, 2009
By

The grammar of graphics approach to constructing graphs has been implemented in the ggplot2 package in R. The author of the package, Hadley Wickham, has provided a website with many details of using the system to create nice looking graphics. The package removes many of the awkward parts of setting up graphical display that characterise other

Read more »

Summarising data using bar charts

December 12, 2009
By
Summarising data using bar charts

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

Read more »

A web application for R’s ggplot2

December 7, 2009
By

One of the exciting new frontiers for R programming is of creating website interfaces to R code. At the forefront of this domain is a young and (very) bright man called Jeroen Ooms, whom I had the pleasure of meeting at useR 2009 (press the link to see his presentation). Today Jeroen announced a new version (0.11)

Read more »

Graph Examples from Visualizing Data by William Cleveland

November 12, 2009
By
Graph Examples from Visualizing Data by William Cleveland

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

Read more »

Using Faceting in ggplot2 to create Trellis-like Plots

November 9, 2009
By
Using Faceting in ggplot2 to create Trellis-like Plots

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. In our previous post

Read more »

QQ plots of p-values in R using ggplot2

November 9, 2009
By

Way back will wrote on this topic.  See his previous post for Stata code for doing this.  Unfortunately the R package that was used to create QQ-plots here has been removed from CRAN, so I wrote my own using ggplot2 and some code I received from Daniel Shriner at NHGRI. Of course you can use R's built-in qqplot() function, but...

Read more »

Creating scatter plots using ggplot2

November 6, 2009
By
Creating scatter plots using ggplot2

The ggplot2 package can be used as an alternative to lattice for producing high quality graphics in R. The package provides a framework and hopefully simple interface to producing graphs and is inspired by the grammar of graphics. The main function for producing graphs in this package is qplot, which stands for quick plot. The first

Read more »