Home > database >  Getting an error while trying to apply the labels of geom_text to a subset of bars
Getting an error while trying to apply the labels of geom_text to a subset of bars

Time:05-12

I want to apply geom_text to a particular set of variables.

I have, for example:

  decade   count
   <dbl> <int>
1   1930   505
2   1940   630
3   1950   806
4   1960   446
5   1970   469
6   1980   807
7   1990  1057
8   2000  1856
9   2010  2133

My plot looks like this: bar_chart

Input:

df =tribble(
  ~decade,~count,
  
1930,   505,
1940,   630,
1950,   806,
1960,   446,
1970,   469,
1980,   807,
1990,  1057,
2000,  1856,
2010,  2133
)
  • Related