I would like to plot (using ggplot) catch data by country per year using the stacked area. Yet, I'm having problems creating my stacked area chart; for some reason it is returning stacked lines:
Med=read.csv("Med1950-2014.csv", header=T)
y=as.numeric(Med$catch)
x=as.numeric(Med$year)
country=as.character(Med$fishing_entity)
Medc<- data.frame(x,y1,country)
ggplot(Medc,aes(x=x,y=y1))+ geom_area(aes(colour=country,fill=country), position = 'stack')
I have tried also this:
gg <- ggplot(Medc, aes(x=as.numeric(as.character(x)), y=y1))
gg <- gg + geom_area(aes(colour=country, fill=country))
gg <- gg + scale_x_discrete(labels=levels(highc$x))
gg