1 min read

Area Plots

This is an area plot showing the number of different starting lineups and minutes continuity since the 2010 season for the North Carolina men’s basketball. Carolina turned it its lowest minutes continuity (24.3) and highest number of starting lineups (10) last season.

This uses the ggplot2 package and hrbrthemes package. Followed the tutorials here.

Code is below . . .

library(ggplot2)
library(dplyr)
library(hrbrthemes)
data <- read.csv("cons.csv")


p <- ggplot(aes(x=Season, y=Value, fill=Stat), data = data, stat="identity") +
  geom_area(alpha =0.5) +
  geom_line() +
  scale_x_continuous(breaks=seq(2010,2020,1)) +
  scale_y_continuous(breaks=seq(0,80,5)) +
  labs(x="Season", y="Value") +
  ggtitle("Carolina: Minutes Continuity and Starting Lineups Each Season Since 2010") +
  theme_ipsum()
p