'Barplots overlapping with blank subplot in Matplotlib

I am trying to make two subplots as a row in matplot lib.

Here is my code

fig, (ax1, ax2) = plt.subplots(1,2)

ax1 = plt.bar(x="Topic", height='perc', data=df1)

ax2 = plt.bar(x="Topic", height='perc', data=df2)

What is happening is that the barplots overlap eachother and leave col1 empty. How can I fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source