Re: [R] Help needed with Waterfall plot

From: Gabor Grothendieck <>
Date: Sat, 01 Nov 2008 10:58:26 -0400

On Sat, Nov 1, 2008 at 10:32 AM, hadley wickham <> wrote:
> On Fri, Oct 31, 2008 at 11:25 AM, Philip Twumasi-Ankrah
> <> wrote:
>> Hi friends,
>> I need suggestions/directions on how to producing a waterfall plot for present extend of change in tumour size for a set of respondents in a study. Example of use of waterfall plot is in the following slides presented at ASCO 2007 by Axel Grothey. Link is
>> The link is pretty long but it takes you right to the presentation.
> Is this really an effective means of describing the distribution of
> percent change in tumour size? Wouldn't a histogram display the
> distribution more effectively?

The waterfall does have the advantage of displaying the raw data whereas a histogram involves summarization. If you meant displaying the raw data using histogram style then that would not be as pretty but does show the individual raw data points more distinctly.

My prior post can be adapted to that by replacing the barplot line with plot(..., type = "h"). (Also used a better scheme for the gray shades and corrected the legend.)

# random data
growth <- sort(runif(215, -100, 100), decreasing = TRUE)

col <- factor(1 + (growth < -25) + (growth < 25), lab = gray(1:3/5)) plot(growth, type = "h", col = levels(col)[col], ylab = "% Growth",

       main = "Random Data", xlab = "", ylim = c(-100, 100)) legend("topright", legend = c("> 25%", "25% > . > -25%", "< -25%"),

       cex = 0.8, bty = "n", fill = levels(col)) mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat 01 Nov 2008 - 15:03:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 01 Nov 2008 - 15:30:22 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive