September 2012
2 posts
How to use your favorite fonts in R charts →
Winston Chang has a guest post on the Revolution Analytics blog about embedding fonts into PDFs using the extrafont package which, not surprisingly, works very well with ggplot2.
Sep 24th
ggbio
ggbio (package, publication) is an extension and specialization of ggplot designed for visualizing genomics annotations and high-throughput data A frequent requirement for plots of genomic data is indicating the relationship of measurements on different scales. For example, the x-axis of the lower plots in this image is the linear chromosome position, but the upper plot shows the expression...
Sep 2nd
1 note
August 2012
4 posts
Defining a new transformation for ggplot2/scales -...
In my previous blog post, I explored what was needed to create a new transformation for the scales package and gave an example of a mathematical transformation. In this post, I want to show an additional example related to the other mentioned use case (mapping a continuous like variable with specific structure and formatting) and extend the example into creating new scales functions which...
Aug 14th
1 note
Mapping Quantitative Values to Color
Nils Gehlenborg & Bang Wong discuss “Mapping Quantitative Values to Color” in this month’s issue of Nature Methods. The article is paywalled, but I was able to access the figure without a subscription. They map out a systematic approach to color choice, starting with considering the salient regions of your data range and any values with special meaning (i.e. zero, 32 degrees...
Aug 5th
1 note
Computing your heart rate with a webcam, ruby, R... →
Aug 3rd
3 notes
Using ggplot2 to examine the digital divide... →
Aug 2nd
July 2012
6 posts
Jul 26th
1 note
Violence In America Visualized via ggplot2 →
Jul 21st
ggplot syntax reminders
There are ggplot features that I use often enough to know they exist but not often enough to remember in detail. Lately I’ve started moving examples of these features to the menu bar. I use the Mac utility called ClipMenu, which I first started using as a clipboard manager, but now I’m using the snippets feature for this. This screen shot shows two ggplot snippets. The first one...
Jul 19th
1 note
Exploring Oracle's revenue with ggplot2 →
Jul 19th
Exploring the Tour de France with R and ggplot2 →
Jul 12th
3 notes
Soda vs. Pop with Twitter →
Jul 9th
June 2012
18 posts
2 tags
Defining a new transformation for ggplot2/scales
Inspired by writing an answer to this question on StackOverflow, I decided to write up a more detailed description of creating a new transformation using the scales package (and also to make sure that I understood all the details about how to really do it). Background To start with, it helps to understand the philosophy behind the scales package. From the description of the scales package: ...
Jun 26th
1 note
Dot density measurements
Jim Perkins is a scientific illustrator who recently contributed a guest post about the various meanings of DPI (dots-per-inch) at Symbiartic, a Scientific American blog about “The art of science and the science of art.” He also has a couple previous posts about calibrating monitors.
Jun 26th
Annotating histograms to indicate the location of... →
Jun 22nd
Simulating conditions of legislative violence
Christopher Gandrud uses ggplot to illustrate his analysis of violence in national legislative chambers (e.g. Turkey, above). After gathering a data set of incidents of legislative violence, he applied logistic regression for rare events to identify the most important variables and the extent of their importance. He then predicted the probability of violence in a range of conditions with a...
Jun 19th
Assessing the Price of Solid State Harddrives
Over a staff meeting at work, the topic of price of solid state hard drives came up (what are they, is it non linear with size, etc.). I decided to sample 120 solid state hard drives from newegg.com and recorded their size (in GB) and price (in USD) as well as their class (SATA II or SATA III). Note that the sampling was semi-random, in that I had no particular agenda, but did not go to great...
Jun 18th
1 note
Data Visualization in the Neurosciences:... →
Summary: In publications, presentations, and popular media, scientific results are predominantly communicated through graphs. But are these figures clear and honest or misleading? We examine current practices in data visualization and discuss improvements, advocating design choices which reveal data rather than hide it.
Jun 17th
A 14 page cheatsheet for ggplot2 →
Written by Ramon Saccilotto, shared by @m4xl1n
Jun 16th
Name popularity
This dynamic representation of the popularity of names over the years is a favorite. It’s not new, but I still find new things to appreciate, like names that used to apply to both sexes and now only one (Ellie), or vice versa (Harley). It seems like there are more very popular male names than very popular female names; I can hardly guess what underlies that.
Jun 16th
1 note
Some interesting ggplot2 tutorials for the social... →
Jun 14th
How to order bars in bar graph (Stack Overflow... →
Jun 13th
1 note
Jun 12th
Jun 11th
Jun 8th
2 notes
11 tags
Choosing colour palettes. Part II: Educated...
There are many resources on the use of colours in R, several packages, and a number of schemes already implemented in ggplot2. In the previous part, we saw how ggplot2 selects a default colour palette according to the type of variable, discrete or continuous. There are further options, illustrated below: Choosing colours for a graphic is often some kind of a compromise. One one hand, you want...
Jun 7th
3 notes
Managing the deluge of DNA data
The explosion in DNA sequencing capacity has shifted the experimental bottleneck from sequencing to analyzing and interpreting sequences. The bioconductor package cummeRbund uses ggplot as part of its tool set for organizing, exploring and visualizing sequencing data related to gene expression. Congrats to the authors on their recent publication (paywall).
Jun 6th
Jun 4th
1 note
Posts about ggplot2 on r-bloggers
You can also get your fix of ggplot2 on r-bloggers (where this blog is also syndicated): http://www.r-bloggers.com/search/ggplot
Jun 3rd
Visualizing car brand choices in ggplot2 →
Jun 3rd
May 2012
9 posts
12 tags
Choosing colour palettes. Part I: Introduction
In this series of three posts, we’ll look at colours in R graphics produced with ggplot2: what are the available choices of colour schemes, and how to choose a colour palette most suitable for a particular graphic? In kindergarten, choosing a colour was easy, palettes were limited to a few classics. As cool kids grow older and use R, the spectrum expands to present us with overwhelming...
May 29th
1 note
2 tags
May 27th
4 tags
Automating repetitive plot elements
The syntax of ggplot2 emphasizes constructing plots by adding components, or layers, using +. Possibly one of the most useful, but least remarked upon, consequences of this syntax is that it allows for an incredible degree of flexibility in saving and reusing components of plots. Here are two very simple examples that come up frequently for me. I frequently make line plots where the x axis is...
May 26th
Sunlight foundation analyses complexity of... →
May 22nd
10 tags
Adding watermarks to plots
A question was raised today on the mailing list: Is there an easy way to add a watermark to a ggplot? There are several options, depending on the type of watermark and the required level of control over the output, add a text label using annotate (the original idea of the poster) add a custom grob (graphical object from the Grid package), using annotation_custom In either case, the...
May 22nd
1 note
4 tags
Bias in Federal Reserve Inflation Forecasts →
Christopher Gandrud uses ggplot2 to visualize potential partisan bias in US Federal Reserve inflation forecasts as a PhD student at the London School of Economics.
May 13th
6 tags
ggplot2 presentation at Victoria University of...
Next week I’ll present a glimpse of R and ggplot2 graphics at VUW. This is a MESA seminar on ‘Data analysis and plotting with free and open source tools’ where we’ll present spreadsheet alternatives based on gnuplot, Python, and R. Presentation
May 13th
1 note
WatchWatch
Neat demo real of d3 (js & svg powered interactive graphics in the browser).  Hopefully there will be ggplot2 integration one day!
May 12th
The Foreign Language of 'Mad Men' →
ggplot2 in the Atlantic
May 12th