Remove All Spines from a Matplotlib Chart

Python

 1|  fig, ax = plt.subplots(figsize=(12, 8))
 2|  ax.hist(df['col_A'])
 3|  
 4|  for side in ['left', 'right', 'bottom', 'top']:
 5|      ax.spines[side].set_visible(False)
Did you find this snippet useful?

Sign up for free to to add this to your code library