graphics

How to make a mosaic plot in R

February 16, 2010 | David Smith

Mosaic plots (aka treemaps) are a great way to visualize hierarchical data. A collection of rectangles represents all the elements to be visualized (customers, news items, blog posts), with the size and color of the rectangles coding attribute. But what makes this chart unique is the arrangement of the elements: ... [Read more...]

Mapping the Massachusetts election upset with R, ctd

February 4, 2010 | David Smith

Last week we looked at an analysis done in R by the good folks at Offensive Politics, looking at the political climate surrounding the recent Senate election in Massachusetts. There were some very insightful comments (thanks, Revolutions readers!) about the design of the charts, especially in the choice of color ... [Read more...]

Crayola crayon colors, 1949-present

January 29, 2010 | David Smith

Here's an example I featured in my list of 7 Awesome Things about R (awesome thing #3: graphics and data visualization). The Learning R blog features a reproduction of a graphic that recently appeared on Flowing Data. It shows the colors in a box of Crayola crayons: before 1949 there were only 8, but ... [Read more...]

How to combine Google maps and data in R

January 27, 2010 | David Smith

Every good artist needs a canvas, and when it comes to displaying geographic data placing those data in context -- on a map -- makes all the difference. A new package for R from Markus Loecher, RgoogleMaps, allows you to download a street or satellite map from Google simply by ... [Read more...]

How to make a heat map in R

January 21, 2010 | David Smith

FlowingData has just posted a nice step-by-step tutorial on how to make a heat-map in R, like this one on attributes of NBA scorers: If you want to take the concept a step further with time-series data, you can also create calendar heat-maps in R. For example, you can track ... [Read more...]

New features in ggplot2 version 0.85

January 18, 2010 | David Smith

Hadley Wickham recently updated the ggplot2 package for R to version 0.8.5. In addition to bugfixes and performance improvements, this version introduces some handy new features. Among them: the ability to display mathematical equations as text, automatic legends for color scales, and user-configurable axis labels and legend titles. The Learning R ... [Read more...]

A tale of two visualizations (because it’s Friday)

January 15, 2010 | David Smith

GEEK FIGHT!!! says JD Long on Twitter as the New York Times publishes a widely-reposted interactive graphic about Netflix rental data, and the Wall Street Journal also gets into the interactive-viz game with a graphic on bank bonuses. If it's a fight, it's a knockout in the first round, if ... [Read more...]

A web-based graphics application based on R

December 24, 2009 | David Smith

FlowingData recently took a look at Jeroen Ooms' latest web-based statistical tool based on R. We've looked at his tools for random-effects models and finance visualizations before, but this one is a more general tool for creating graphs from data sets using the ggplot2 package. It's pretty slick. All you ...
[Read more...]

Because it’s Friday: The decline of empires

December 18, 2009 | David Smith

Here's a neat visualization of the decline of the British, Spanish, Portugese and French empires from 1800 to present day. It's definitely more art than stats -- judging by the relative size of India and Australia I think the circles are scaled to area, not population -- but it definitely does ... [Read more...]

The R Graphical Manual

December 10, 2009 | David Smith

R has a lot of functions. Add in all the packages on CRAN, and then there's a lot of functions. You can search through the contents of the function documentation at places like Rseek.org, but the R Graphical Manual takes a different tack on exploring the functions in R: ... [Read more...]

R Tutorial Series: Scatterplots

November 12, 2009 | John M. Quick

A scatterplot is a useful way to visualize the relationship between two variables. Similar to correlations, scatterplots are often used to make initial diagnoses before any statistical analyses are conducted. This tutorial will explore the ways in whic...
[Read more...]

Example 7.15: A more complex sales graphic

October 13, 2009 | Ken Kleinman

The plot of Amazon sales rank over time generated in example 7.14 leaves questions. From a software perspective, we'd like to make the plot prettier, while we can embellish the plot to inform our interpretation about how the rank is calculated.For the latter purpose, we'll create an indicator of whether ...
[Read more...]

50000 Revisions Committed to R

October 10, 2009 | Yihui Xie

oday Romain Francois posted an interesting topic in the R-help list, and you can read his blog post for more details: celebrating R commit #50000. 50000 is certainly not a small number; we do owe R core members a big “thank you” for their great efforts in this fantastic statistical language in ... [Read more...]

Example 7.12: Calculate and plot a running average

September 17, 2009 | Nick Horton

The Law of Large Numbers concerns the stability of the mean, as sample sizes increase. This is an important topic in mathematical statistics. The convergence (or lack thereof, for certain distributions) can easily be visualized in SAS and R (see also Horton, Qian and Brown, 2004).Assume that X1, X2, ..., Xn ...
[Read more...]

RGG#155, 156 and 157

July 21, 2009 | romain francois

I pushed 3 more graphics from Biecek Przemyslaw to the graphics gallery A list of popular names for colors from packages RColorBrewer, colorRamps, grDevices A set of examples of few graphical low-level parameters lend, ljoin, xpd, adj, lege... [Read more...]

RGG# 154: demo of atomic functions

July 7, 2009 | romain francois

Przemyslaw Biecek has submitted this graph (and also others I will add later) to the graphics gallery A list of examples for the atomic functions polygon(), segments(), symbols(), arrows(), curve(), abline(), points(), lines(). this figure is t... [Read more...]

Example 7.4: A prettier jittered scatterplot

July 2, 2009 | Ken Kleinman

The plot in section 7.3 has some problems. At the very least, the jittered values ought to be between 0 and 1, so the smoothed lines fit better with them. Once again we use the data generated in section 7.2 as an example. For both SAS and R, we use conditioning (section 1.11.2) to make ...
[Read more...]

How to plot a graph in R

June 2, 2009 | Chris

Here's a quick tutorial on how to get a nice looking graph out of R (aka the R Project for Statistical Computing). Don't forget that help for any R command can be displayed by typing the question mark followed by the command. For example, to see help o...
[Read more...]
1 8 9 10 11

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)