Created
October 18, 2013 16:44
-
-
Save neomatrix369/7044298 to your computer and use it in GitHub Desktop.
R Script to display a simple bar graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > counts <- table(mtcars$vs, mtcars$gear) | |
| > par(bg = "white"); | |
| > barplot(counts, main="Car Distribution by Gears and VS", | |
| xlab="Number of Gears", col=c("darkblue","maroon"), | |
| legend = rownames(counts), beside=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment