More fun with boxplots

May 19, 2011 | Gregor

Here are a few more plotting options for boxplots: Let’s start plotting the full set plot(b$mod, b$x) Plot labels for a subset in full set plot (label all points x __ -1) text(subset(b$mod, b$x __ -1), subset(b$x, b$x __ -1), … Continue reading → [Read more...]

Graphing – margins, titles, mtext, workspace

February 21, 2011 | nzcoops

This is a great post, very true, not enough of R’s graphics are well displayed online to really see how to achieve what the often ambiguous ‘help’ information suggests. I particularly find “mtext(“lol”, outer=T)” to be ... [Read more...]

Plotting Time Series data using ggplot2

September 30, 2010 | Ralph

There are various ways to plot data that is represented by a time series in R. The ggplot2 package has scales that can handle dates reasonably easily. Fast Tube by Casper As an example consider a data set on the number of views of the you tube channel ramstatvid. A ...
[Read more...]

R: Clash of the cannon cycles

July 19, 2010 | Matt Asher

Imagine a unit square. Every side has length 1, perfectly square. Now imagine this square was really a fence, and you picked two spots at random along the fence, with uniform probability over the length of the fence. At each of these two locations, set down a special kind of cannon. ... [Read more...]

Visualization of regression coefficients (in R)

July 2, 2010 | Tal Galili

Update (07.07.10): The function in this post has a more mature version in the “arm” package. See at the end of this post for more details. * * * * Imagine you want to give a presentation or report of your latest findings running some sort of regression analysis. How would you do it? This ... [Read more...]

Example 7.41: hazard function plotting

June 14, 2010 | Nick Horton

As we continue with our series on survival analysis, we demonstrate how to plot estimated (smoothed) hazard functions. RWe will utilize the routines available in the muhaz package. Background information on the methods can be found in K.R. Hess, D.M....
[Read more...]

First annual R plot replication prize

May 3, 2010 | Matt Asher

$100 to the first person who can figure out how I created this plot and replicate it. Some hints: It was done in R. There is only one underlying probability distribution involved (one “rdist()“). Including the “plot” statement, I created this with 3 short lines of code. This is based on a ... [Read more...]

Summarising data using scatter plots

April 18, 2010 | Ralph

A scatter plot is a graph used to investigate the relationship between two variables in a data set. The x and y axes are used for the values of the two variables and a symbol on the graph represents the combination for each pair of values in the data set. ...
[Read more...]

R: another nifty graph

April 8, 2010 | Tal Galili

Make sure to click on the image to see the large version. Code for this graph: moxbuller = function(n) { u = runif(n) v = runif(n) x = cos(2*pi*u)*sqrt(-2*log(v)) y = sin(2*pi*v)*sqrt(-2*log(u)) r = list(x=x, y=y) return(r) } r = ... [Read more...]

Summarising data using dot plots

March 26, 2010 | Ralph

A dot plot is a type of display that compares counts, frequencies, totals or other summary measures for a series of categories. The dot plot can be arranged with the categories either on the vertical or horizontal axis of the display to allow comparising between the different categories as well ... [Read more...]

R plotting fun

March 25, 2010 | Tal Galili

Not easy to produce cool looking graphs in R, but it can be done. The results of some messing around are above. Here is the code I used: [Read more...]

ggplot2: Two Color XY-Area Combo Chart

October 21, 2009 | learnr

David@Work blog shows how to fill in the area between two crossing lines in an Excel chart. This post was also published as a guest-post on PTS blog. Let’s try to replicate this graph in ggplot2. First, load ggplot2 and generate the data frame to be used in ... [Read more...]
1 2 3

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)