seaborn开篇
seaborn风格设置
plt
.figure
(figsize
=(12,8))
plt
.subplot
(231)
sns
.boxplot
(data
=data
)
with sns
.axes_style
("darkgrid"):
plt
.subplot
(232)
sns
.boxplot
(data
=data
)
with sns
.axes_style
("whitegrid"):
plt
.subplot
(233)
sns
.boxplot
(data
=data
)
with sns
.axes_style
("dark"):
plt
.subplot
(234)
sns
.boxplot
(data
=data
)
with sns
.axes_style
("white"):
plt
.subplot
(235)
sns
.boxplot
(data
=data
)
with sns
.axes_style
("ticks"):
plt
.subplot
(236)
sns
.boxplot
(data
=data
)
色系选择
plt
.figure
(figsize
=(12,8))
plt
.subplot
(231)
palette
=sns
.color_palette
()
sns
.boxplot
(data
=data
,palette
=palette
)
plt
.subplot
(232)
palette
=sns
.hls_palette
(6, l
=.7, s
=.9)
sns
.boxplot
(data
=data
,palette
=palette
)
plt
.subplot
(233)
palette
=sns
.color_palette
("Paired",6)
sns
.boxplot
(data
=data
,palette
=palette
)
plt
.subplot
(234)
colors
= ["pale red","windows blue", "amber", "greyish", "faded green", "dusty purple"]
palette
=sns
.xkcd_palette
(colors
)
sns
.boxplot
(data
=data
,palette
=palette
)
plt
.subplot
(235)
palette
=sns
.color_palette
("Blues")
sns
.boxplot
(data
=data
,palette
=palette
)
plt
.subplot
(236)
palette
=sns
.cubehelix_palette
(6, start
=.75, rot
=-.75)
sns
.boxplot
(data
=data
,palette
=palette
)
转载请注明原文地址:https://ipadbbs.8miu.com/read-11215.html