1 Upvote

Remove All Spines from a Matplotlib Chart

Python
Visualisation & EDA

fig, ax = plt.subplots(figsize=(12, 8))
ax.hist(df['col_A'])

for side in ['left', 'right', 'bottom', 'top']:
    ax.spines[side].set_visible(False)

By GregHe1979 - Last Updated June 19, 2022, 9:19 p.m.

Did you find this snippet useful?

Sign up to bookmark this in your snippet library

COMMENTS
RELATED SNIPPETS
2
Top Contributors
103
100