Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have tried ylim but does not work in my case.
- season_top_scorer <- match_full%>%
- group_by(season,batsman)%>%
- summarize(total_runs = sum(batsman_runs))%>%
- arrange(season,desc(total_runs))%>%
- filter(total_runs == max(total_runs))%>%
- arrange(desc(total_runs))%>%
- ggplot(aes(x = season,y = total_runs,fill = batsman))+
- geom_bar(stat ="identity")+
- ggtitle("Highest run scorer each season")+
- theme(axis.text.x = element_text(angle = 90, hjust = 1))+
- scale_x_discrete(name="Season",
- limits=c(2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019))+
- geom_text(aes(label= total_runs,vjust= 0 ))+
- scale_y_discrete(name="Total Runs", limits=c(0,250,500,750,1000,1250))
- The only problem is with season 2016. The height of bar is too big that
- its cutting off the label.Any idea what might solve this problem in the
- above code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement