I am working on an app, and right now I want to compare two NBA players' career totals on a bar graph as I pick and choose which players will be compared. For example, when I select Michael Jordan and LeBron James, and career points, I want a bar graph that displays 32,292 for Michael Jordan, and 35,618, but if I were to swap LeBron James out for Kareem Abdul-Jabbar, I would like the bar graph to display 38,387. The ability to change the inputs has been taken care of, and the data set needed to do this is implemented. I just need help figuring out how to have geom_text(aes_string(label = *)) *
change given different inputs in my ggplot.
Asked
Active
Viewed 28 times
0

neuron
- 1,949
- 1
- 15
- 30
-
Hi Sebastian. This is a rather vague question. What are the inputs chosen by the user? What are the columns of your dataset? How do you compute the career totals? Therefore it would be easier to help you if you provide a [minimal (!!!) reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – stefan Nov 28 '21 at 08:45
-
What have you tried so far? Can you provide toy data as @stefan suggests or at least the code you've tried thus far? – JRR Dec 02 '21 at 15:00