Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ggplot2)
- library(Cairo)
- library(RColorBrewer)
- csv_data <- read.csv(file="csv_file", head=FALSE, sep=",")
- runs <- csv_data[,1]
- tims <- csv_data[,2]
- myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(20)
- CairoPNG("output_file", width=800, height=600)
- qplot(runs, tims, geom=c("point", "line"), colour=tims, xlab="Runs", ylab="Time in ms", main="Improvements in Round1", label=tims) +
- scale_x_continuous(breaks=1:length(runs)) +
- ylim(31000, 36000) +
- scale_colour_gradient(low=tail(myCol, 1), high=myCol[1]) +
- geom_text(size = 3, vjust = -1, hjust = -0.1, colour= "black") +
- geom_point(color = "black", fill= "red", shape = 23, size=4) +
- opts(legend.position = "none")
- dev.off()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement