mergeggplot: merge two ggplots

Description Usage Arguments Examples

View source: R/dual-y-axis.R

Description

merge two ggplots

Usage

1
mergeggplot(leftplot, rightplot)

Arguments

leftplot

left plot

rightplot

right plot

Examples

1
2
3
4
5
   library(ggplot2)
   p1<-ggplot(economics, aes(date, unemploy)) + geom_line()
   recent <- economics[economics$date > as.Date("2013-01-01"), ]
   p2<-ggplot(recent, aes(date, unemploy)) + geom_line(colour="red")
   mergeggplot(p1,p2)

ShouyeLiu/metaboliteUtility documentation built on May 6, 2019, 9:07 a.m.