Created
May 2, 2015 05:08
-
-
Save rtanglao/e0a183170ac2710cb5ef to your computer and use it in GitHub Desktop.
how to make a barplot in R with a CSV file using colours from the CSV file itself
This file contains 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
sorted = read.csv("/Users/rolandtanglao/Dropbox/PHOTOS/instagram-top10-vancouver-2014/sorted-ig-van-2014-top-colour-names.csv") | |
counts3 = head(sorted[,2],200) | |
colours3 = head(sorted[,1],200) | |
barplot(counts3, main="Colour Distribution", | |
col=colours3, | |
xlab="Top Colours", | |
ylab="Colour Counts") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment