第11种方法,一键美化Python图表 to 商业风!
续前文:
这里再分享一种方法morethemes,一行代码让matplotlib图表切换为常见商业图表风格:
安装
# 安装
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教程:详细目录
加入学习(收费)