Re: [Rpy] multiple data frames in ggplot2

2009-12-16 Thread Faisal Moledina
> Can't guess without knowing the exact code (otherwise I would be in the > paranormal, investment, or gambling business, I suppose) but this is this > the kind of error you get in R when calling print.gglot on a ggplot objects > (well, a proto object) that does not have defined layers. I've put a

Re: [Rpy] multiple data frames in ggplot2

2009-12-10 Thread Laurent Gautier
On 12/10/09 6:07 PM, Faisal Moledina wrote: > On Thu, Dec 10, 2009 at 2:13 AM, Laurent Gautier wrote: >> >> Can you report in the bitbucket issue tracker what is that >> is missing from rpy2.robjects.lib.ggplot2 so it can be added ? >> >> (note: the mapping is hopefully moving towards a more dynam

Re: [Rpy] multiple data frames in ggplot2

2009-12-10 Thread Faisal Moledina
On Thu, Dec 10, 2009 at 2:13 AM, Laurent Gautier wrote: > > Can you report in the bitbucket issue tracker what is that > is missing from rpy2.robjects.lib.ggplot2 so it can be added ? > > (note: the mapping is hopefully moving towards a more dynamic generation, > although that's probably for relea

Re: [Rpy] multiple data frames in ggplot2

2009-12-09 Thread Laurent Gautier
On 12/9/09 11:45 PM, Faisal Moledina wrote: > On Thu, Dec 3, 2009 at 10:57 AM, Laurent Gautier wrote: >> >> Please continue reporting what does work like it seems it should along the >> way. >> > > This may sound ridiculous, but I'm not sure how to display the plot > anymore. The ggplot stored in

Re: [Rpy] multiple data frames in ggplot2

2009-12-09 Thread Faisal Moledina
On Thu, Dec 3, 2009 at 10:57 AM, Laurent Gautier wrote: > > Please continue reporting what does work like it seems it should along the > way. > This may sound ridiculous, but I'm not sure how to display the plot anymore. The ggplot stored in 'pp' generated by the static ggplot2 library had a plot

Re: [Rpy] multiple data frames in ggplot2

2009-12-03 Thread Laurent Gautier
Faisal Moledina wrote: > On Tue, Dec 1, 2009 at 5:34 PM, Laurent Gautier wrote: >> This is an involuntary omission. >> >> The rpy2.robjects.lib.ggplot2 module started out as a way to show how to map >> Python classes onto R classes manually (not matter what flavour of R OOP is >> used). >> (I have

Re: [Rpy] multiple data frames in ggplot2

2009-12-01 Thread Faisal Moledina
On Tue, Dec 1, 2009 at 5:34 PM, Laurent Gautier wrote: > This is an involuntary omission. > > The rpy2.robjects.lib.ggplot2 module started out as a way to show how to map > Python classes onto R classes manually (not matter what flavour of R OOP is > used). > (I have updated the documentation rece

Re: [Rpy] multiple data frames in ggplot2

2009-12-01 Thread Laurent Gautier
Faisal Moledina wrote: > On Mon, Nov 30, 2009 at 4:26 PM, Laurent Gautier wrote: >>> Next problem: Because I included the option y='..density..' in my >>> histogram aes, my plot now has ..density.. as its x label. This >>> doesn't happen in R. I thought I could rectify this by adding the line >>>

Re: [Rpy] multiple data frames in ggplot2

2009-11-30 Thread Faisal Moledina
On Mon, Nov 30, 2009 at 4:26 PM, Laurent Gautier wrote: >> Next problem: Because I included the option y='..density..' in my >> histogram aes, my plot now has ..density.. as its x label. This >> doesn't happen in R. I thought I could rectify this by adding the line >> pp=pp+ggplot2.opts(xlab="z"),

Re: [Rpy] multiple data frames in ggplot2

2009-11-30 Thread Laurent Gautier
Faisal Moledina wrote: > Laurent, > > On Sun, Nov 29, 2009 at 4:13 AM, Laurent Gautier wrote: >> That's more an issue with ggplot2 than with rpy2. >> What I meant earlier is the following: >> >> pp += ggplot2.geom_line(ggplot2.aes_string(x='z',y='dens'), >>data=datafline)

Re: [Rpy] multiple data frames in ggplot2

2009-11-29 Thread Faisal Moledina
Laurent, On Sun, Nov 29, 2009 at 4:13 AM, Laurent Gautier wrote: > > That's more an issue with ggplot2 than with rpy2. > What I meant earlier is the following: > > pp += ggplot2.geom_line(ggplot2.aes_string(x='z',y='dens'), >                        data=datafline) > > > It is working here (rpy2-2

Re: [Rpy] multiple data frames in ggplot2

2009-11-29 Thread Laurent Gautier
Faisal Moledina wrote: > Hello Laurent, > > I've attached a minimal example. Removing the comment at line 69, which reads: > pp=pp+ggplot2.geom_line(datafline,ggplot2.aes_string(x='z',y='dens')) That's more an issue with ggplot2 than with rpy2. What I meant earlier is the following: pp += ggplo

Re: [Rpy] multiple data frames in ggplot2

2009-11-28 Thread Faisal Moledina
Hello Laurent, I've attached a minimal example. Removing the comment at line 69, which reads: pp=pp+ggplot2.geom_line(datafline,ggplot2.aes_string(x='z',y='dens')) results in the following output from iPython: x Error: ggplot2 doesn't know how to deal with data of

Re: [Rpy] multiple data frames in ggplot2

2009-11-28 Thread Laurent Gautier
Faisal, At first sight the difference between your R code and your rpy2 code for geom_line is that you pass the data.frame zfunc with a name ( data = zfunc ) with R, and without with rpy2. Without the complete Python traceback or a standalone example (off-list, if you are more comfortable to do

[Rpy] multiple data frames in ggplot2

2009-11-26 Thread Faisal Moledina
Hello everyone, I'm trying to port the following R code to rpy2: plots<-ggplot(pz_r,aes(x=z))+geom_histogram(aes(y=..density..),binwidth=bw)+geom_line(data=zfunc,aes(x=z,y=dens)) where pz_r is a data frame of observations of the random variable z, and zfunc is a data frame with the probability d