ggplot(df, aes(x, y, colour=g)) + geom_line(stat="identity") + theme(legend.position="bottom") + theme(legend.title=element_blank())