0

The code below produces the image below. How can the code be modified to make the plot not have the grey space just outside of the colored groups? In some sense, I want the color part of the image to be touching the white around the image.

#import the libraries
 
library(ggplot2)
library(dplyr)
  
#creates the values and data frame
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() 

enter image description here

user551504
  • 113
  • 4

0 Answers0