library(ggplot2) library(scales) epw = "/home/martin/weather-datasets/GBR_London-Heathrow.AP.2003.baseline_CIBSETM49.epw" idf = "/home/martin/pyidf/Minimal.idf" system(paste("energyplus -r -a -w ",epw," ",idf)) EPO = read.csv("eplusout.csv") names(EPO)<-c("DT","SOLAR") EPO$DT = as.POSIXlt(EPO$DT,format="%m/%d %H:%M:%S") EPO$HR = as.numeric(format(EPO$DT, "%H")) p = ggplot(EPO,aes(x = DT, y = HR, color = SOLAR))+layer(geom = "point")+ scale_y_reverse(expand = c(0,0),breaks = c(0:24), labels=c( "0","","","3","","","6","","", "9","","","12","","","15","","", "18","","","21","","","24"), limits = c(24,0))+ scale_x_datetime(breaks = "1 month",expand = c(0,0),labels = date_format("%^b"))+ scale_colour_gradient(limits=c(0, 800),low="white", high="black")+ theme( panel.background = element_rect(fill = 'white'), # fill background white panel.border = element_rect(fill=NA,colour = "#AAAAAA",size=2), # set size and colour of panel border panel.grid.major = element_line(colour = "#B0B0B0"), # change grid line colour panel.grid.minor.x = element_blank(), # remove x-axis minor gridlines axis.text = element_text(size=10, colour = "#505050"), # set size and colour of axis text axis.title.x = element_text(vjust=-3,size=10), # set position of x-axis title text axis.title.y = element_text(vjust=+3,size=10)) # set position of y-axis title text png(file = "myplot.png", bg = "transparent",width = 1000, height = 480) p dev.off()