Advertisement
Guest User

Untitled

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