I extended the subview function to support embed image file in a ggplot object.
d = data.frame(x=rnorm(10), y=rnorm(10))
imgfile <- tempfile(, fileext=".png")
p = ggplot(d, aes(x, y))
subview(p, imgfile, x=d$x, y=d$y) + geom_point(size=5)
In previous post, I have introduced using annotation_image function for annotating tips...
I’m a huge fan of ProPublica. They have a super-savvy tech team, great reporters, awesome graphics folks and excel at data-driven journalism. Plus, they give away virtually everything, including data, text, graphics & tools. I was reading @USATODAY’s piece on lead levels in drinking water across America and saw they had a mini-interactive piece included
Last year I wrote a short demo on variography with gstat and ggplot2 for a colleague who was planning to migrate to R. Just thought I’d share this here (with some additional stuff) as it might be useful for other people as well.First, make sure you have the necessary packages installed and loaded:require('gstat')## Loading required package: gstatrequire('sp')## Loading required package: sprequire('ggplot2')## Loading...
In our second course on ggplot2 “Data Visualization with ggplot2 (2)”, you will take the step from exploratory to explanatory data visualization. In five chapters, you’ll get to know more ggplot layers and tools needed to create excellent visuals that can be used in many different cases.
Begin learning Data Visualization with ggplot2 interactively, today.
Understanding how a distribution of a variable changes over time can make a great visualization. These highly intuitive graphics can display a lot of information and can be simply rendered in R using ggplot2. However, based on my experience, they are one of the most underutilized graphs in R.A good example of this style of graph is from my...
(This article was first published on Reimagined Invention, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on their blog: Reimagined Invention. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave,...
A couple of days ago (2016-03-12) a short blog post by Bob Rudis appeared on R-bloggers.com, "Subtitles in ggplot2". I was intrigued by the idea and what this could mean for my own plotting efforts, and it turned out to be very simple to apply. (Note that Bob's post originally appeared on his own blog,...
Subtitles aren’t always necessary for plots, but I began to use them enough that I whipped up a function for ggplot2 that does a decent job adding a subtitle to a finished plot object. More than a few folks have tried their hand at this in the past and this is just my incremental contribution
I’m very pleased to announce the release of ggplot2 2.1.0, scales 0.4.0, and gtable 0.2.0. These are set of relatively minor updates that fix a whole bunch of little problems that crept in during the last big update. The most important changes are described below. When mapping an aesthetic to a constant the default guide
This post comes hot off the heels of the nigh-feature-complete release of vegalite (virtually all the components of Vega-Lite are now implemented and just need real-world user testing). I’ve had a few and seen a few questions about “why Vega-Lite”? I think my previous post gave some good answers to “why”. However, Vega-Lite and Vega