原文:Python数据处理从零开始----第四章(可视化)(6)(画布设置)www.jianshu.com
使用样式表自定义绘图
style包为易于切换的绘图『样式』增加了支持,它们与matplotlibrc文件参数相同。
有一些预定义样式由matplotlib提供。 例如,有一个名为『ggplot』的预定义样式,它模拟ggplot(R 的一种流行的绘图软件包)的美学。 为了使用此样式。首先,调出所有可以选择的样式列表print(plt.style.available) # 打印样式列表
['bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark-palette', 'seaborn-dark', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seabor