New to Python and Seaborn - I am trying to plot a histogram which shows distribution of the below data against state.
df = pd.DataFrame([
['AZ',1,1],
['NC',1,1],
['AZ',1,0],
['CA',1,0],
['AZ',1,0],
['CA',1,0],
['FG',1,0],
['LL',1,0],
['ER',1,0],
['PO',1,0],
['ER',1,0],
['MN',1,0],
['UI',1,0],
['PP',1,0],
['QQ',1,0],
['GG',1,0],
['CV',1,0],
['CV',1,0],
['MM',1,0],
['OO',1,0],
['TT',1,0],
['AS',1,0],
['DF',1,0],
['GH',1,0],
['MN',1,0],
['LO',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['ML',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['NG',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['IO',1,0],
['CA',1,0],
['KK',1,0],
['CA',1,0],
['CA',1,0],
['CA',1,0],
['AS',1,0],
['LL',1,0],
['CA',1,0],
['LO',1,0],
['CA',1,0],
['CA',1,0],
['GG',1,0],
['UU',1,0],
['II',1,0],
['CA',1,0],
['CA',1,0],
['PO',1,0]
], columns=['addr_state', 'B', 'C'])
sns.histplot(df['addr_state'])
The graph of the above comes like below
The x axis ticks if you observe are very close to each other and there are going to be more states that might get added. How can I control the density of the ticks? Do i need to increase the overall space for the graph? If so, how can i do that?