这里再分享一种方法morethemes,一行代码让matplotlib图表切换"wsj", "urban", "minimal", "ft", "nature", "economist", "retro","yellowish", "darker", "monoblue"10种风格:
使用方法很简单,
# 安装
pip install morethemes
代码前加两行,
import morethemes as mt #加载morethemes
mt.set_theme("wsj") #使用华尔街日报风格
以之前的文章为例子,Python 3D曲面Surface自由
原图已经很漂亮了,
WSJ (Wall Street Journal) - 华尔街日报风格(偏向灰、白、金的商业色调)
FT (Financial Times) - 金融时报(橙、黑、白,财经风)
Economist (The Economist) - 经济学人(红、黑、白,分析感)
Yellowish - 偏黄(浅黄、金黄,温暖明亮)
Nature - 自然(绿、棕、蓝,自然色系)
Retro - 复古(橙、棕、黄,怀旧色调)
Minimal - 极简(黑、白、灰,简洁纯净)
Urban - 城市(深灰、金属色,现代都市感)
推荐阅读:
Python matplotlib保姆级教程
保姆级matplotlib教程—详细目录
Python seaborn保姆级教程
保姆级seaborn教程:详细目录