# @file TM52_C2_bar.r # @author Martin Brien martin.brien@scotchpartners.com> ################################################################################################### TM52_C2_bar <- function(inputData, zoneName) { assign( paste("plot5_",zoneName,sep=""), ggplot()+ layer( data = inputData, mapping = aes(x = DATE, y = OCT), geom = "line")+ geom_hline(yintercept=6,color="red", size = 1)+ scale_x_datetime( breaks = "1 month", expand = c(0,0), labels = date_format("%^b"), limits=c(as.POSIXct('2015/05/01'),as.POSIXct('2015/10/1')))+ scale_y_continuous(limits = c(0, 200),expand = c(0,0))+ theme( panel.background = element_rect(fill = 'white'), panel.grid.major = element_line(colour = "#B0B0B0"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), axis.text = element_text(size=10, colour = "#505050"), axis.title.x = element_text(vjust=-3,size=10), axis.title.y = element_text(vjust=+3,size=10), panel.border = element_rect(fill=NA,colour = "#AAAAAA",size=2), plot.margin=unit(c(1,1,1.5,1.2),"cm"))+ labs(color="")+xlab("Day of Year") +ylab("Hour of Day")+ ggtitle(paste(zoneName)), envir = .GlobalEnv)}