# @file GUIDEA_scatter.r geom_ribbon # @author Martin Brien martin.brien@scotchpartners.com> ################################################################################################### GUIDEA_scatter <- function(inputData, zoneName) { assign( paste("plot5_",zoneName,sep=""), ggplot()+ layer( data = inputData, mapping = aes(x = DT, y = OAT), geom = "line", geom_params = list(size=0.25,color = "steelblue"))+ layer( data = inputData, mapping = aes(x = DT, y = IOT), geom = "point", geom_params = list(size=1,color = "grey",shape=1))+ geom_hline(yintercept=28,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, 50),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)}