0

im trying to add the default percentage % on top of the bars in the following graph. y is the loan purpose and x-axis is the number of loans issued for each category. The default variable tells whether the loan has been payed back or not.

enter image description here

Can anyone help with the code? What I have done is

ggplot(loan_data, aes(x=purpose, fill = default)) 
+ geom_bar() 
+ coord_flip() 
+ facet_wrap(~term)
Erick
  • 133
  • 2
  • 3
  • 16
  • Thanks @Maurits Evers but If I were you I would see the graph and read the qs more carefully so I can catch what the other person wants and I would try to be helpful if I can, instead of going the easy way and marking it as a duplicate just to earn some points. – Erick Aug 08 '18 at 16:54
  • 1
    If I were you I would familiarise myself with the SO guidelines first before posting obvious duplicate questions. Generally we expect you to do a substantial amount of research prior to posting here. Also to put your mind at ease, no points are earned for flagging duplicates! Familiarity with SO guidelines would've told you that too. – Maurits Evers Aug 08 '18 at 21:10
  • @MauritsEvers still you have not understood what my qs is. In the link you are refering they put the % in y axes so they are plotting the cal vs %s, while I want to have the count NOT the %s in my "y-axis". whatever.... there is no point of cont this discussion. – Erick Aug 08 '18 at 22:04

0 Answers0