标签:offset 5.5 距离 idt bsp 1.5 otto 画图 spi
(一) 导入seaborn库:
(二) 在画图之前设置画图的风格:
sns.set()
sns.axes_style("darkgrid"):
其中有五种风格可选择
注:
1、 若要控制某子图的不同风格,可将改子图放在with范围内
with sns.axes_style("darkgrid"):
plt.subplot(211)
sinplot()
plt.subplot(212)
sinplot(-1)
2、 plt.figure(figsize=(8, 6)) :设置图片大小
3、 sns.despine(offset=10) :offset值代表绘制的图形距离轴的距离
4、 sns.despine(left=True) :隐藏轴线(left, right , bottom, top),设置为True则表示隐藏
5、 sns.set_context("poster") :设置图形线条和轴刻度(paper, talk, poster依次增粗)
6、 sns.set_context("notebook", font_scale=1.5, rc={"lines.linewidth": 5.5}) #font_scale设置轴刻度数字大小, rc={"lines.linewidth": 1.5}设置图形内线条的大小
标签:offset 5.5 距离 idt bsp 1.5 otto 画图 spi
原文地址:http://www.cnblogs.com/wqpkita/p/7457090.html