首先找到Anaconda Prompt命令行,下载seaborn库 ,命令 pip install seaborn 1.风格设置 import seaborn as sns import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt % matplotlib inline 写完就更新,不用
首先找到Anaconda Prompt命令行,下载seaborn库 ,命令 pip install seaborn
1.风格设置
import seaborn as sns import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline 写完就更新,不用一直点击运行 def sinplot(flip=1): x = np.linspace(0,14,100) 在0-14的区间上找出100个点 for i in range(1,7): plt.plot(x,np.sin(x+i*.5)*(7-i)*flip) sinplot()
sns.set() seaborn默认的格式
sinplot()
seaborn的5种主题风格:darkgrid、whitegrid、dark、white、ticks (背景颜色)