Skip to content

Instantly share code, notes, and snippets.

@gtgrthrst
Created June 14, 2021 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtgrthrst/a2a4560b628d10f7ac007f9a78c5c958 to your computer and use it in GitHub Desktop.
Save gtgrthrst/a2a4560b628d10f7ac007f9a78c5c958 to your computer and use it in GitHub Desktop.
time<- as.numeric(rep(seq(1,7),each=7))
value<- runif(49,30,100)
group<- rep(LETTERS[1:7], times=7)
data1<-data.frame(time,value,group)
#plot the area stacked area chart
ggplot(data1, aes(x=time, y=value, fill=group))+geom_area()+
theme(axis.title=element_blank(),
axis.text=element_blank(),
axis.ticks=element_blank())+
guides(fill = FALSE, color = FALSE, linetype = FALSE, shape = FALSE, size = FALSE) #刪除圖例
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment