1267 search results for "ggplot2"

Setting graph margins in R using the par() function and lots of cow milk

June 30, 2010
By
Setting graph margins in R using the par() function and lots of cow milk

It is fairly straightforward to set the margins of a graph in R by calling the par() function with the mar (for margin!) argument. For example, par(mar=c(5.1,4.1,4.1,2.1) sets the bottom, left, top and right margins respectively of the plot region in number of lines of text. Another way is by specifying the margins in inches

Read more »

Analyze Gold Demand and Investments using R

June 29, 2010
By
Analyze Gold Demand and Investments using R

After the recent foray into stock analysis using quantmod, I thought it worthwhile to mention that the library can be used to analyze a wide variety of investments, including precious metals.  It is also worthwhile to mention that there are other ...

Read more »

Plot Multiple Time Series using the flow / inkblot / river / ribbon / volcano / hourglass / area / whatchamacallit plots ~ blue whale catch per country w/ ggplot2

June 27, 2010
By
Plot Multiple Time Series using the flow / inkblot / river / ribbon / volcano / hourglass / area / whatchamacallit plots ~ blue whale catch per country w/ ggplot2

Ever since I first looked at this NYT visualization by Amanda Cox, I’ve always wanted to reproduce this in R. This is a plot that stacks multiple time series onto one another, with the width of the river/ribbon/hourglass representing the strength at each time. The NYT article used box office revenue as the width of

Read more »

World Bank API R package available!

June 23, 2010
By
World Bank API R package available!

In previous posts I demonstrated R plots created using World Bank Data through their API.  The following is a much nicer example of what is possible.  Many thanks to Vincent Arel-Bundock for sharing his work to make the World Bank D...

Read more »

Analyzing competitive nordic skiing with R

June 22, 2010
By
Analyzing competitive nordic skiing with R

Here's another great example of R being used to analyze sports data. Statistician and skier Joran Elias has started a project to analyze and visualize international cross country ski racing results, and he publishes his analysis at the blog Statistical Skier. All of the analyses are done using R (and for data, SQLite via the RSQLite package). As much...

Read more »

Employee productivity as function of number of workers revisited

June 22, 2010
By
Employee productivity as function of number of workers revisited

We have a mild obsession with employee productivity and how that declines as companies get bigger. We have previously found that when you treble the number of workers, you halve their individual productivity which is mildly scary.

We revisit the analysis for the...

Read more »

Employee productivity as function of number of workers revisited

June 22, 2010
By
Employee productivity as function of number of workers revisited

We have a mild obsession with employee productivity and how that declines as companies get bigger. We have previously found that when you treble the number of workers, you halve their individual productivity which is mildly scary.

We revisit the analysis for the...

Read more »

R Layout command.

June 21, 2010
By
R Layout command.

In the previous post I created a chart but could not figure out to fit the legend in the chart area. Peter Carl pointed me to the layout command which partitions the display area and allowed the the legend to be included. Source code to produce the c...

Read more »

ggplot2 GUI progress

June 19, 2010
By
ggplot2 GUI progress

(Written by Ian Fellows) Below is a link to the first of a weekly (or bi-weekly) screen-cast vlog of my progress building a GUI for the ggplot2 package. http://neolab.stat.ucla.edu/cranstats/gsoc_vlog1.mov comments and suggestions are more than welcome, and can e-mailed to me at: hefell@gmail.com

Read more »

Manhattan plots for SNP marker effects using ggplot2

June 17, 2010
By
Manhattan plots for SNP marker effects using ggplot2

At AIPL, we've been posting Manhattan plots of the marker effects for each breed-trait combination with each official release of our genomic predictions. For example, consider the plot of lifetime net merit for Holsteins from the April, 2010 run: Thes...

Read more »