Jeremy Van Cleve <vancleve <at> santafe.edu> writes: > > > Hello, > Its doesn't look like the message posted by Peter Sudmant on April 21st > hasn't gotten a reply yet and I'm noticing the same problem with > creating a dataframe and plotting it with ggplot. With python 2.6.5, > rpy2 2.1.1 and R 2.11.0, I try the following from the documentation: > -- > import rpy2.robjects.lib.ggplot2 as ggplot2 > import rpy2.robjects as ro > d = {'a': ro.IntVector((1,2,3)), 'b': ro.IntVector((4,5,6))} > dataf = ro.DataFrame(d) > gp = ggplot2.ggplot(dataf) > pp = gp + ggplot2.geom_point() > pp.plot()
I can't say why this is necessary, but if you change the pp = line to pp = gp + ggplot2.aes_string(x='a', y='b') + ggplot2.geom_point() it plots fine for me. JDO ------------------------------------------------------------------------------ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list