Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-28 Thread hadley wickham
Hi Marshall, It sounds like an interesting idea. I would approach it in a slightly different way. I'd recommending writing a function that returns a geom_bar object - that way you can easily add it on to any existing plot, specifying the appropriate parameters. If you just wanted to plot that l

Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread Marshall Feldman
Hi Hadley, Thanks for the terrific package! If you'd like I could give you my code, but conceptually what I'm trying to do is pretty simple. The chart on this page

Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread hadley wickham
> Other then rebuilding the plots, is there any way either (1) to combine > existing ggplot2 plots or (2) to extract a layer from an existing plot > so that it can be added to another? Not really, although you can always pull apart the plot components. Can you give an example of what you are tryin

[R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread Marshall Feldman
Hi, Other then rebuilding the plots, is there any way either (1) to combine existing ggplot2 plots or (2) to extract a layer from an existing plot so that it can be added to another? Thanks. -- Dr. Marshall Feldman, PhD Director of Research and Academic Affairs Center for Urban Studies a