Re: [R] Bumps chart in R

2009-05-07 Thread Andreas Christoffersen
ician after the experiment is done may be no more than > asking him to perform a post-mortem examination: he may be able to say what > the experiment died of. > ~ Sir Ronald Aylmer Fisher > > The plural of anecdote is not data. > ~ Roger Brinner > > The combination of some data an

Re: [R] Bumps chart in R

2009-05-07 Thread ONKELINX, Thierry
The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@

Re: [R] Bumps chart in R

2009-05-07 Thread Andreas Christoffersen
On Thu, May 7, 2009 at 2:15 AM, Mike Lawrence wrote: > (cross posting to the ggplot2 group for posterity) > > Here's how I'd approach it: > > library(ggplot2) > text = letters[1:20] > tal1 = rnorm (20,5,2) > tal2 = rnorm (20,6,3) > dif = tal2-tal1 > df0 = data.frame(text,tal1,tal2) > df = melt( >

Re: [R] Bumps chart in R

2009-05-06 Thread Mike Lawrence
(cross posting to the ggplot2 group for posterity) Here's how I'd approach it: library(ggplot2) text = letters[1:20] tal1 = rnorm (20,5,2) tal2 = rnorm (20,6,3) dif = tal2-tal1 df0 = data.frame(text,tal1,tal2) df = melt( data = df0 , id.vars = 'text' , variable_name = 'tal

Re: [R] Bumps chart in R

2009-05-06 Thread Andreas Christoffersen
Okay - first off: Thank you all for you kind help so far. (Especially to hadly for writing ggplot2). I feel that I am beginning to understand the grammar of graphics - but obviously still have a long way to go. Some of the road I need to travel has to do with basic R. Anyway ; instead of wrting a n

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
>> Is there no simple way to just: legend=F ? > > + opts(legend.position = "none") > > Hadley My legend is removed! - Couldn't find it in your ggplot2 book - but here it is. Brilliant - thank you very much. __ R-help@r-project.org mailing list https://s

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
I am sorry - but maybe someone will help me with the final puzzle. How to remove the legend from the qplot? I can google my way to something like sc <- scale_fill_continuous() s...@legend <- FALSE but qplot(year, value, data = data, xlab="År",ylab="% i ekstrem fattigdom", geom = "line", group =

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
> Or just add the text layer separately: > > qplot(year, value, data = data, geom = "line", group = countries) + >  geom_text(aes(label = countries), subset = .(year == 1990), >    hjust = 1, size = 3, lineheight = 1) THX a lot! The subset did not work for me, but this does: subset(data,year == 19

Re: [R] Bumps chart in R

2009-04-27 Thread hadley wickham
] > library(ggplot2) > qplot(year,value, data=data,label=countries, geom=c("line","text"), > group=countries, col=countries) > > But I would like to have the text labels show only once - e.g. at 1990 > - and also control the size of the text. In my crude qplot, setting > size=2 e.g. changes not onl

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
> Hi Andreas, > Not too hard. Try this: Amazing! - a bump.plot function - so cool. I love it when I simultaneously realize the power of R and my own limitations with R. I must learn how to write my own functions (suggestions for good introduction are very welcome) But: When I run the following bu

Re: [R] Bumps chart in R

2009-04-27 Thread Jim Lemon
Andreas Christoffersen wrote: Hi there, I would like to make a 'bumps chart' like the ones described e.g. here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ Purpose: I'd like to plot the proportion of people in select countries living for less then one USD pr day in 1994 and 2004 resp

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
thank you kindly - will do :-) Cheers On Mon, Apr 27, 2009 at 1:21 AM, Gabor Grothendieck wrote: > Have a look at plotweb in the bipartite package. > > On Sun, Apr 26, 2009 at 6:45 PM, Andreas Christoffersen > wrote: >> Hi there, >> >> I would like to make a 'bumps chart' like the ones describe

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
On Mon, Apr 27, 2009 at 2:23 AM, Mike Lawrence wrote: > Here's a ggplot2 based solution: Wauw - thank you. I'm sure I need to understand gplot better. With qplot I can make something similar - quite easy. With your reformattet data: #here's the data provided by Andreas countries <- c("U-lande",

Re: [R] Bumps chart in R

2009-04-27 Thread Andreas Christoffersen
> In statistics, a bumps chart is more commonly called a parallel > coordinates plot. Thank you. However - my understanding of the parallel coordinates plot is that you have factors, not time, on the x axis. Also the 'bump chart' i invision is best suited for only two different x categories. But t

Re: [R] Bumps chart in R

2009-04-26 Thread Mike Lawrence
Here's a ggplot2 based solution: #load the ggplot2 library library(ggplot2) #here's the data provided by Andreas countries <- c("U-lande", "Afrika syd for sahara", "Europa og Centralasien", "Lantinamerika og Caribien","Mellemøstenog Nordafrika","Sydasien","ØStasien og stillehaveet", "Kina", "Bras

Re: [R] Bumps chart in R

2009-04-26 Thread Gabor Grothendieck
Have a look at plotweb in the bipartite package. On Sun, Apr 26, 2009 at 6:45 PM, Andreas Christoffersen wrote: > Hi there, > > I would like to make a 'bumps chart' like the ones described e.g. > here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ > > Purpose: I'd like to plot the propor

Re: [R] Bumps chart in R

2009-04-26 Thread hadley wickham
In statistics, a bumps chart is more commonly called a parallel coordinates plot. Hadley On Sun, Apr 26, 2009 at 5:45 PM, Andreas Christoffersen wrote: > Hi there, > > I would like to make a 'bumps chart' like the ones described e.g. > here: http://junkcharts.typepad.com/junk_charts/bumps_chart/

[R] Bumps chart in R

2009-04-26 Thread Andreas Christoffersen
Hi there, I would like to make a 'bumps chart' like the ones described e.g. here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ Purpose: I'd like to plot the proportion of people in select countries living for less then one USD pr day in 1994 and 2004 respectively. I have already constru