#run first time: install.packages('ggplot2'); install.packages('sqldf') library(ggplot2) library(sqldf) d = read.csv.sql('1.csv', "select * from file") pdf('output.pdf') ggplot(aes(threads, 1/time, color=workload), data=d) + geom_point() + geom_line() ggplot(aes(threads, 1/time), data=d) + facet_grid(workload ~ .) + geom_point() + geom_line() dev.off()