Line plot over bar plot using Seaborn – Line plot won’t render

The command plt.subplots(figsize = (10, 10)), indicates that you want to divide canvas and create the subplots on it.
For your current requirement, you could do something like –

ax = sns.barplot(x='Submission Date', y='Count Handled', data=df_cd)
ax2 = ax.twinx()
ax2.plot(ax.get_xticks(), df_cd.Rating)

Here, you are creating the barplot first and adding the line plot over it with the same x-axis.

Leave a Comment