SHARE
TWEET

Untitled

a guest Jun 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I have tried ylim but does not work in my case.
  2.  
  3. season_top_scorer <- match_full%>%
  4. group_by(season,batsman)%>%
  5. summarize(total_runs = sum(batsman_runs))%>%
  6. arrange(season,desc(total_runs))%>%
  7. filter(total_runs == max(total_runs))%>%
  8. arrange(desc(total_runs))%>%
  9. ggplot(aes(x = season,y = total_runs,fill = batsman))+
  10. geom_bar(stat ="identity")+
  11. ggtitle("Highest run scorer each season")+
  12. theme(axis.text.x = element_text(angle = 90, hjust = 1))+
  13. scale_x_discrete(name="Season",
  14. limits=c(2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019))+
  15. geom_text(aes(label= total_runs,vjust= 0 ))+
  16. scale_y_discrete(name="Total Runs", limits=c(0,250,500,750,1000,1250))
  17.  
  18. The only problem is with season 2016. The height of bar is too big that
  19. its cutting off the label.Any idea what might solve this problem in the
  20. above code
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top