# setup data
set.seed(51)
supply <- rnorm(100,mean=15-seq(1,6,by=.05),sd=1)
demand <- rnorm(100,mean=4+seq(1,21,by=.2),sd=.5)
time<-seq(1,100,by=1)
data <- data.frame(time, supply,demand)
# make the plot
library(ggplot2)
ggplot(data,aes(time)) +
geom_line(aes(y=demand),size=1.6, color="#008fd5") +
geom_line(aes(y=supply),size=1.6, color="#ff2700") +
theme_fte() +
annotate("text",x=90,y=12,label="Demand") +
annotate("text",x=80,y=23,label="Supply")
geom_foot("danielmarcelino.github.io", color = "#77ab43", rotn = -90, just ="right" )
Run the code above in your browser using DataLab