Skip to content Skip to sidebar Skip to footer

Hide Text Before Seaborn Barplot

I am trying to print a barplot using seaborn plt.figure(figsize=(16, 6)) g = sns.barplot(x = 'A', y = 'B', data = df) g.set_xticklabels(g.get_xticklabels(), rotation=90) However,

Solution 1:

set_ticklabels returns the tick values. You can either suppress it with a semicolon

g.set_xticklabels(g.get_xticklabels(), rotation=90);

Or assign the return to a name

ticks = g.set_xticklabels(g.get_xticklabels(), rotation=90)

Solution 2:

The setting of text is returning the text objs. Thus; if you take them in a variable, then no output would be there.

var = g.set_xticklabels(g.get_xticklabels(), rotation=90)

Post a Comment for "Hide Text Before Seaborn Barplot"