I am working on a stacked area graph and need to reverse the order of stacks in the graph. Its a large dataframe, but it only has 3 variables once gathered into tidy format - Month , area , and volume . I wasn't able to create reprex with the data.
The code for the graph is as follows:
ggplot(neb6) +
geom_area(aes(x=Month, y= volume/1000000, fill=area), show.legend = NA) +
labs(y="MMbbl/d", x="Year", title="Condensate",
caption="Source: NEB") +
theme_bw()
The graph fills the area on the y-axis using the smallest fill, or stacked area, up to the largest. A picture of the graph is attached. Is it possible to change the order in the stacked areas so they dont drop to zero?