I wish to plot several joint distribution scatter plots on the same figure. I use the following code:
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
np.random.seed(0)
data1 = np.random.multivariate_normal([0,0], [[1,0.5],[0.5,1]], size=200)
data2 = np.random.multivariate_normal([0,0], [[1,-0.8],[-0.8,1]], size=100)
df1 = pd.DataFrame(data1, columns=['x1', 'y1'])
df2 = pd.DataFrame(data2, columns=['x2', 'y2'])
fig, axs = plt.subplots(ncols=3)
graph1 = sns.jointplot(x=df1.x1, y=df1.y1, color='r', ax = axs[0])
graph2 = sns.jointplot(x=df1.x1, y=df1.y1, color='r', ax = axs[1])
graph3 = sns.jointplot(x=df1.x1, y=df1.y1, color='r', ax = axs[2])
But I get the error:
TypeError: inner() got multiple values for argument 'ax'
What am I doing wrong?