• Given a CSV file saved to ~/Documents/sample-hour-count-colorname.csv
    hour,count,colour
    1,5,red
    1,2,green
    2,10,red
    2,3,blue
    3,2,green
    3,5,red
    
  • Then the following R code creates an encircled plot
hh = read_csv("~/Documents/sample-hour-count-colorname.csv")
gg <- ggplot(hh, aes(hour, count))
p <- gg + geom_encircle(aes(group=colour,colour=I(colour))) + geom_point()
p

results in the following output graph

Graph (has flickr embed which could break in the future)

hour-count-colour-sample-plot-averagecolour

Previously

Leave a comment on github