Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

I want to add bar values on top of each stacked bar in the bar plot with geom_text() of titanic dataset

$
0
0

@amodaks wrote:

hello friends, I want to add bar values on top of each stacked bar in the bar plot with geom_text() of titanic dataset…
My x variable is ‘Sex’ and have filled it with the variable ‘Survived’
here is my code:
ggplot(titanic) + aes(x= Sex, fill = Survived) + geom_bar()

output:
Rplot

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles