I am trying to create a stacked area chart of 4 categories of data using geom_area in R. I am able to construct line charts for the categories using geom_line() but when I use geom_area to show shaded regions, the vertical scale is incorrect. It looks like it may be doing some summing of the data. My line chart code looks like this and produces an accurate plot with a range of values from 0 to approximately $800,000:
lp3b<-ggplot(
data=myHousing,aes(x=Year,y=Home.Value,color=State))+geom_line()
lp3b
My area plot code, below, produces a plot the visually is correct but the vertical scale goes from 0 - to about $1,600,000 which is definitely not the correct range of values. I checked the range of data values before and after plotting and the area chart definitely has the scale wrong.
lp3c<-ggplot()+geom_area(data=myHousing,
aes(x=Year,y=Home.Value,fill=State),alpha=0.5,position="stack")
lp3c