Advertisement
Atheuz

Untitled

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