本文分享Python seaborn中通过风格style美化图形。
风格(style),用于设置the general style of the plots,例如,图中网格线是否开启、颜色、线宽等。
5.2 style设置图形通用样式
5.2.1 axes_style查看style内容
一张图的style包含的内容可通过axes_style()查看,
sns.axes_style()
{'axes.facecolor': '#EAEAF2', # 坐标轴背景颜色'axes.edgecolor': 'white', # 坐标轴边框颜色'axes.grid': True, # 是否显示网格线'axes.axisbelow': True, # 网格线是否在图形下方'axes.labelcolor': '.15', # 坐标轴标签颜色'figure.facecolor': 'white', # 图形背景颜色'grid.color': 'white', # 网格线颜色'grid.linestyle': '-', # 网格线样式'text.color': '.15',