remove spines and ticks from graph

Solutions on MaxInterview for remove spines and ticks from graph by the best coders in the world

showing results for - "remove spines and ticks from graph"
Mahamadou
22 Jan 2017
1import pandas as pd
2import matplotlib.pyplot as plt
3
4top20_deathtoll = pd.read_csv('top20_deathtoll.csv')
5
6fig, ax = plt.subplots(figsize=(4.5, 6))
7ax.barh(top20_deathtoll['Country_Other'],
8         top20_deathtoll['Total_Deaths'])
9
10#Remove all four spines from the horizontal bar plot.
11for graph_spines in ['left', 'right', 'bottom', 'top']:
12    ax.spines[graph_spines].set_visible(False)
13#Remove the bottom and left ticks from the horizontal bar plot.
14ax.tick_params(bottom = False, left = False)
15plt.show()
16
17
similar questions
queries leading to this page
remove spines and ticks from graph