Re: [R] Help needed with Waterfall plot

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Sat, 01 Nov 2008 21:41:41 +1100

Thomas Petzoldt wrote:
> Philip Twumasi-Ankrah schrieb:
>> 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
>> http://media.asco.org/player/default.aspx?LectureID=AG265&conferenceFolder=GI2007&SessionFolder=Poster&slideonly=yes&TrackID=N929&LectureTitle=Waterfall%20plots%20provide%20detailed%20information%20on%20magnitude%20of%20response%20to%20conventional%20chemotherapy%20in%20colorectal%20cancer%3a%20Lessons%20learned%20from%20N9741.&Key=vm_45_3_26_265&SpeakerName=%3b%20Presenter%3a%20Axel%20Grothey%2c%20MD&mediaURL=%2fmedia&ServerName=media.asco.org&max=12&ext=jpg&useASX=false&playtype=&playtype=&playtype=,
>>
>>
>> The link is pretty long but it takes you right to the presentation.
>
> Hi Phillip,
>
> is this a "waterfall plot":
>
> ## a few data
> x <- 0:99
> y <- sort(rnorm(100), decreasing=TRUE)
>
> # the plot
> plot(y, type="n")
> polygon(c(min(x), x, max(x), 0), c(0, y, 0, 0), col="green")
>
Hi Thomas (and Philip again),
Very nice - Ijust read your email and tested it with a non-monotonic y and it works. I guess there isn't any point in writing a "waterfall plot" function after all.

Jim



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 01 Nov 2008 - 10:45:00 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 - 11:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive