Current Output Expected Output Goal: I want to see the countplot and line plot on the same graph
Problem: i am only seeing the countplot presented
Treaty Year,As of Combined Incurred Amount
0,1999,69512.0
1,2001,552564.63
2,2001,1955896.62
3,2004,976349.81
4,2013,787644.0
5,2013,26937.63
6,1999,95510.0
7,1999,1670073.53
8,1999,1752561.23
9,1999,222182.81
%matplotlib inline
import matplotlib
import seaborn as sns
matplotlib.rc_file_defaults()
ax1 = sns.set_style(style=None, rc=None )
fig, ax1= plt.subplots(figsize=(12,3))
ax1 = sns.lineplot(x='Year', y='Val', data=df, marker='o', sort = True, ax=ax1)
ax2 = ax1.twinx()
sns.countplot(x='Year', data=df, ax=ax2)
ax1.get_yaxis().set_major_formatter(ticker.FuncFormatter(lambda x, p: format(int(x), ',')))
fig.show()