设置matplotlib的绘图风格

2024-10-11 19:50:04

1、设定样式前可先查看matplotlib有哪些样式,使用函数plt.style.available查看可用的样式,结果列出了27种style,如下图。

设置matplotlib的绘图风格

3、再尝试seaborn风格:plt.style.use('seaborn')

设置matplotlib的绘图风格

5、下面是classic风格:plt.style.use('classic')

设置matplotlib的绘图风格
猜你喜欢