我想在下面的代码中将特定颜色(不同于彩虹默认值)更改为每一列“扇区”
我读过 geom_area 不允许改变颜色?如果是这样,是否有另一种方法可以在不使用 ggplot2 包的情况下绘制此图?
Sector <- rep(c("S01","S02","S03","S04","S05","S06","S07"),times=7)
Year <- as.numeric(rep(c("1950","1960","1970","1980","1990","2000","2010"),each=7))
Value <- runif(49, 10, 100)
data <- data.frame(Sector,Year,Value)
data
ggplot(data, aes(x=Year, y=Value, fill=Sector)) +
geom_area(stat="identity")