DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Barplot The Lines Of Code By Module
The CSV file "loc.csv" contains the following:
Module LOC a.rb 100 b.rb 120 c.rb 54
The following R code creates the barplot image "loc.png":
data <- read.csv(file="loc.csv", sep = " ", header = TRUE, row.names = "Module")
png("loc.png", width = 640, height = 480)
barplot(data$LOC, names = rownames(data), ylim = c(0, 250), main = "Lines of code by module", ylab = "Lines of code", xlab = "Module")
dev.off()





