Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtanglao/e0a183170ac2710cb5ef to your computer and use it in GitHub Desktop.
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
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