Reputation: 5668
Is it possible to place value into bar itself?
For example place numbers 1-4 on centers of these bars.
This bar chart is from searborn examples.
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.barplot(x="day", y="total_bill", data=tips)
Upvotes: 0
Views: 47
Reputation: 11754
You can use matplotlib.pyplot.text
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.barplot(x="day", y="total_bill", data=tips)
ax.text( -0.1, 10, '1', fontsize=24)
ax.text(1-0.1, 10, '2', fontsize=24)
ax.text(2-0.1, 10, '3', fontsize=24)
ax.text(3-0.1, 10, '4', fontsize=24)
Upvotes: 1