簡體   English   中英

Seaborn 沒有顯示完整的情節

[英]Seaborn not showing full plot

我試圖從 Seaborn 庫中繪制“提示”數據集,但這樣做時我只能得到圖表的深色背景。 沿邊緣的實際散點圖和直方圖未顯示。

我正在 Anaconda 發行版中的 Spyder 中運行代碼。

我哪里錯了?

import seaborn as sns
import matplotlib as plt

sns.set(style="darkgrid", color_codes=True)


#Import data
tips = sns.load_dataset('tips')
tips.head()

sns.jointplot(x='total_bill', y='tip', data='tips')
plt.show()

這里data="tips"不是string

所以你需要更改以下行:

sns.jointplot(x='total_bill', y='tip', data=tips)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM