A discussion was posted on stackoverflow on How to draw rainfall runoff graph in R using ggplot

Read in gage and model streamflows, mean area precipitation

mapDF <- get(load("MeanAreaPrecip.2011.Rdata"))
obsDF <- get(load("ObsStreamflow.2011.Rdata"))
modDF <- get(load("modStreamflow.2011.Rdata"))

USGS gage info

gName   <- "04119000"
sName   <- "GRAND RAPIDS AT GRAND RAPIDS, MI"

ggplot2 hydrograph

Courtesy to R Recipe: Aligning Axes in ggplot2

library(ggplot2)
library(grid)
library(gridExtra)

merDF  <- rbind(obsDF[, c("gages", "date", "streamflow", "type")],
                modDF[, c("gages", "date", "streamflow", "type")])


g1 <- ggplot(mapDF, aes(date, meanContributing)) +
  geom_bar(stat = 'identity', fill = "blue") +
  theme_bw() +
  ylab("Precip.") +
  labs(title = paste0(gName, "@", sName)) +
  scale_y_reverse()+
  theme(axis.title.x    = element_blank(),
        axis.text.x     = element_blank(),
        axis.ticks.x    = element_blank())

g2 <- ggplot(merDF, aes(date, streamflow, color = type))+
  geom_line() +
  ylab("Streamflow (CMS)") +
  scale_color_manual(values = c("red", "black")) +
  theme_bw() +
  theme(legend.position = c(0.8, 0.8),
        legend.title    = element_blank())
g1 <- ggplot_gtable(ggplot_build(g1))
g2 <- ggplot_gtable(ggplot_build(g2))
maxWidth = unit.pmax(g1$widths[2:3], g2$widths[2:3])

g1$widths[2:3] <- maxWidth
g2$widths[2:3] <- maxWidth
grid.arrange(g1, g2, ncol = 1, heights = c(1, 3))

Plot hydrograph

maxSF   <- max(c(modDF$streamflow, obsDF$streamflow), na.rm = T)
maxPR   <- max(mapDF$meanContributing, na.rm = T)
par(mar = c(4, 4, 3, 4) + 0.1)
plot(modDF$date, modDF$streamflow,
     type = 'l', col = "red",
     ylim = c(0, 1.3 * maxSF),
     xaxs = "i", yaxs = "i",
     xlab = "Time", ylab = "Streamflow (cms)",
     main = paste0(gName, " @ ", sName), cex.main = 0.9)
lines(obsDF0$date, obsDF0$streamflow, col = "black")

par(new = TRUE)
plot(x = mapDF0$date, y = rep(0, nrow(mapDF)),
     type = "n", ylim = c(5 * maxPR, 0),
     xaxs = "i", yaxs = "i",
     axes = FALSE, xlab = "", ylab = "")
segments(x0 = mapDF$date, y0 = rep(0, nrow(mapDF)),
         x1 = mapDF$date, y1 = mapDF$meanContributing,
         lend = 2, lwd =1)

yrAxis  <- seq(0, ceiling(maxPR), length.out = 5)
axis(4, at = yrAxis, labels = paste0(yrAxis))
#       mtext(y = yrAxis, par(usr)[1], labels = yrAxis)
mtext("Precip.", side = 4, line = 2, adj = 1)