geom_text not working on my pie chart in R
in
The Complete Data Visualization Course with Python, R, Tableau, and Excel
/
Pie Chart - R - How to Create a Pie Chart
I ran the code
pe_chart <- pie_chart + geom_text(aes(label = percentages),
position = position_stack(vjust = 0.5))
all previous codes, defining this code ran fine, however when i tried to run this it returned an error and says aesthetics :: label needs to be defined for geom_text.
What am i doing wrong?
1 answers ( 0 marked as helpful)
Hi Anika,
thanks for reaching out! From the code you've shared, the only mistake I see is a typo in the first pie_chart(it's missing an "i"). If that's not the issue, could you please share a screenshot of your entire pie_chart code, to check if there's an error in some other part of the code? Thank you!
Best,
365 Eli