Visualize a binary vector

Viewed 46

I have a binary column in pandas dataframe. I want to visualize it, just to see how much there is 0 or 1. I used displot:

Plot = sns.displot(data = data, x = 'stroke', color = 'm')
Plot.fig.suptitle('Stroke numbers in data', size=15, y=1.12);

This did the job but it's very ugly, how do I make it only with 0 and 1 ?:

enter image description here

1 Answers

I think this is a good solution:

data["stroke"].value_counts(sort=False).plot.bar(rot=0)
Related