Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- qplot <- ggplot(data = softdrinkdata3, aes(x = week)) +
- geom_line(aes(y = q1, colour = "Pepsi")) +
- geom_line(aes(y = q2, colour = "Coca Cola")) +
- geom_line(aes(y = q3, colour = "7Up")) +
- geom_line(aes(y = q4, colour = "Dom Orange")) +
- geom_point(aes(y= special.x, colour= "Special week"))+
- scale_colour_manual("", values = c("Pepsi"="blue", "Coca Cola"="red",
- "7Up"="dark green", "Dom Orange"="orange", "Special week"="black")) +
- xlab("Week") + ylab("Quantity sold per week") + theme(legend.position="bottom", plot.title = element_text(size=22),
- axis.title.x = element_text(color = "grey20", size = 16, angle = 0, hjust = .5, vjust = 0, face = "plain"),
- axis.title.y = element_text(color = "grey20", size = 16, angle = 90, hjust = .5, vjust = .5, face = "plain")) +
- labs(title="Weekly quantity variation", caption = "Data from Dominick´s Finer Food, 1989-1994")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement