I am using GGPLOT to create a stacked bar chart where y axis should be total number of movies, x axis should be year and the fill should be countries.
Here what I have tried so far but Y axis is giving a irregular number:
ggplot(IMDB, aes(fill=country,y=nrow(IMDB), x=year))
+ geom_bar(position="stack", stat="identity")
Table sample:
year country
2002 Germany
1998 USA
1955 Italy
Maybe try:
ggplot(IMDB, aes(fill=country, x=year))
+ geom_bar(position="stack")
geom_bar
will give the count of movies per year per country.
Is it what you are looking for ?