I've produced two code snippets for seaborn histograms in subplots. First one
fig, axes = plt.subplots(1, 2, figsize=(15, 5), sharey=False)
sns.histplot(ax=axes[1,0],x=data.age)
sns.histplot(ax=axes[0,0],x=data.duration)
plt.show()
which gives me an error:
sns.histplot(ax=axes[1,0],x=data.age)
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
and the second one
fig, axes = plt.subplots(1, 2, figsize=(15, 5), sharey=False)
sns.histplot(ax=axes[1],x=data.age)
sns.histplot(ax=axes[0],x=data.duration)
plt.show()
The data are from bank marketing dataset from uci.
Pleas advise me what I'm doing wrong in the first snippet.