我用seaborn从一个excel文件中的数据创建了一个直方图。为了更好的可视化,我希望在条/桶之间留出一些空间。这有可能吗?import pandas as pdimport matplotlib.pyplot as pltimport seabornsns.set_style("white")plt.figure(figsize=(12,10))
p
我在pandas数据框中有以下数据集: x = df_data.iloc[:,0].values
y = df_data.iloc[:,1].values 以下数据分别位于x和y中: x = 30,我对使用seaborn或matplotlib持开放态度,但找不到一种方法来分别输入x和y数据,并获得条形图和密度图。
这就是我想要的reproduceimport pandas as pdimport matplotlib.pyplot as plt# p = sns.distplot(replicates, bins=30, )
# distplot is deprecated, so use histplotp = sns.histplot(replicates, bins=30, stat='
根据海运文档, seaborn.distplot()已经被否决了,支持的前进的地块是:seaborn.displot()和seaborn.histplot()。但是,当我尝试使用displot()或histplot()时,会得到以下属性错误:
AttributeError: module 'seaborn' has no attribute 'displot'注意,我可以成功地运行seaborn.jointplot()和其他各种程