报错:
TypeError: scatterplot() takes from 0 to 1 positional arguments but 2 were given
问题:
我猜出这个报错的都是这么写的:
x_data = [1,2,3] y_data = [4,5,6] sns.scatterplot(x_data, y_data) plt.show()
解法:在x_data前面加x=,y_data前面加y=,即:
x_data = [1,2,3]
y_data = [4,5,6]
sns.scatterplot(x=x_data, y=y_data)
plt.show()
标签:plt,show,python,疑难杂症,报错,scatterplot,data
From: https://www.cnblogs.com/code-pigeon/p/17780451.html