Skip to main content
 首页 » 编程设计

python之Seaborn 情节未显示

2024年10月24日12arxive

<分区>

我正在学习教程 here对于看起来最简单的例子 - 线性关系。

我不清楚非常宽松的进口,而且似乎无法展示我的情节。

my_seaborn_test.py:

import numpy as np 
import seaborn as sns 
 
class SeabornTest(object):  
    def run_example(self): 
        sns.set(color_codes=True) 
        np.random.seed(sum(map(ord, "regression"))) 
        tips = sns.load_dataset("tips") 
        sns.lmplot(x="size", y="tip", data=tips, x_estimator=np.mean) 

在命令行上:

python 
from my_seaborn_test import SeabornTest 
st = SeabornTest() 
st.run_example() 

我得到的只是沉默和这个警告:

/home/me/anaconda3/envs/myenv/lib/python3.5/site-packages/matplotlib/__init__.py:892: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter. 
  warnings.warn(self.msg_depr % (key, alt_key))