[R] two plots in qplot

Brian Diggs diggsb at ohsu.edu
Mon Mar 28 23:00:16 CEST 2011


On 3/25/2011 3:13 AM, Denis Kazakiewicz wrote:
> Hello
> I simply want to plot two variables against one 'year' variable in
> qplot.
> Is any way of doing this without reshaping data in long format and using
> facet function afterwards?

Yes, its is possible.  But it is harder and more convoluted than 
reshaping the data.  You can create separate ggplot objects for each 
part and arrange them using align.plots in the ggExtra package on R-Forge.

> Thank you
>
> Denis
>


-- 
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University



More information about the R-help mailing list