Tag: 海鸥

如何在不更改matplotlib默认值的情况下使用seaborn?

我正在尝试使用seaborn,因为它的distplot函数。 但我更喜欢默认的matplotlib设置。 当我导入海豹时,它会自动改变我的身材的外观。 我如何使用seaborn函数而不改变图的外观?

Seaborn地块没有出现

我确定我忘记了一件很简单的事情,但是我无法与Seaborn合作。 如果我做: import seaborn as sns 然后,我用matplotlib创build的任何地块都会得到Seaborn样式(在后台使用灰色网格)。 但是,如果我尝试做一个例子,例如: In [1]: import seaborn as sns In [2]: sns.set() In [3]: df = sns.load_dataset('iris') In [4]: sns.pairplot(df, hue='species', size=2.5) Out[4]: <seaborn.axisgrid.PairGrid at 0x3e59150> pairplot函数返回一个PairGrid对象,但该图不显示。 我有点困惑,因为matplotlib似乎运作正常,Seaborn样式适用于其他matplotlib情节,但Seaborn函数似乎没有做任何事情。 有没有人知道可能是什么问题?