I tried to do this for quite some time and so far I have not been able to align two different types of diagrams along the X axis, which are the same. I just need a double line chart on top of the histogram when both charts have the same X axis.
Below is my details below, along with the code I have written so far, and several attempts.
My details:
Date <- c("2015-07-22", "2015-07-23", "2015-07-24", "2015-07-25", "2015-07-26", "2015-07-27", "2015-07-28", "2015-07-29", "2015-07-30", "2015-07-31", "2015-08-01", "2015-08-02", "2015-08-03", "2015-08-04", "2015-08-05") Mean_temp12z <- c(66.6, 64.6, 67.6, 69.6, 72.0, 71.8, 73.0, 72.2, 72.8, 71.8, 69.4, 64.2, 61.2, 62.0, 63.4) Mean_temp0z <- c(62.8, 65.0, 67.4, 71.6, 72.4, 71.6, 71.0, 71.8, 71.6, 69.6, 69.2, 66.2, 60.6, 63.6, 66.4) temp_deltalow <- c( 3.8, -0.4, 0.2, -2.0, -0.4, 0.2, 2.0, 0.4, 1.2, 2.2, 0.2, -2.0, 0.6, -1.6, -3.0) GFS_low_changes <- data.frame(Date, Mean_temp12z, Mean_temp0z, temp_deltalow)
What I have drawn so far is a two-line graph shown using this code and the image below:
low_line <- ggplot(GFS_low_changes, aes(Date))+ geom_line(aes(y= Mean_temp12z, colour= "Mean_temp12z" ))+ geom_line(aes(y= Mean_temp0z, colour= "Mean_temp0z"))+ geom_point(aes(y= Mean_temp12z))+ geom_point(aes(y= Mean_temp0z))+ theme(legend.title= element_text(colour="black", size=12))+ scale_color_discrete(name="GFS Models")+ labs(y= "Temperature °F")

I also built a diagram showing the delta between model 0z and model 12z, shown with the code and image below:
low_bar <- ggplot(data = GFS_low_changes, aes(x= Date, y = temp_deltalow)) + geom_bar(colour= "black", fill= ifelse(temp_deltalow>0,"red","blue"), stat= "identity", position = "identity") + geom_text(aes(label= paste(temp_deltalow, "°F"),hjust= 0.4, vjust= ifelse(temp_deltalow>0,-0.5,1)), size= 5)

So, when creating both of these charts, I would like to combine them along the X axis with a line chart on top of the histogram. The mutual distance between the two is preferable, but I could not get close to them.
I tried using the grid.draw function from the gridExtra package with the code:
grid.newpage() grid.draw(rbind(ggplotGrob(low_line), ggplotGrob(low_bar), recording= T))
but I get the error message: Error: ncol (x) == ncol (y) is not TRUE
I also used grid.arrange , which gives me better results, but not where close to the same x axis and seamless integration between the two diagrams.
I want to avoid working here, but I tried to melt the data frame above and was only able to build graphic strings. But any help in this area is also greatly appreciated.
I basically ran away from this example during my attempts: https://gist.github.com/tomhopper/faa24797bb44addeba79
Any help on this is greatly appreciated!