pythonic生物人

第10种方法,一键美化Python图表

续上文👉:9种方法,一键美化Python图表

这里再分享一种方法Rosé Pine for Matplotlib,一键美化Python图表,适合优雅的极简主义者。


Rosé Pine for Matplotlib主题效果

Rosé Pine for Matplotlib包含三种风格的主题,

  • dawn主题

ImageImageImage


  • moon主题

ImageImageImage


  • Rosé Pine

ImageImageImage


Rosé Pine for Matplotlib主题使用

  • 下载一下

https://github.com/h4pZ/rose-pine-matplotlib/archive/refs/heads/main.zip

  • 解压一下
Image
  • 使用一下

以rose-pine-dawn.mplstyle的使用为例,假设rose-pine-dawn.mplstyle主题的本地路径为,

xxx/rose-pine-matplotlib-main/themes/rose-pine-dawn.mplstyle

使用rose-pine-dawn.mplstyle主题

import matplotlib.pyplot as plt

plt.figure(dpi=150)
plt.style.use(
"xxx/rose-pine-matplotlib-main/themes/rose-pine-dawn.mplstyle"
)  #使用rose-pine-dawn.mplstyle主题
plt.bar([1, 2, 3], [1, 2, 3])


-END-
推荐阅读:
👉Python matplotlib保姆级教程
👉保姆级matplotlib教程—详细目录
👉Python seaborn保姆级教程
👉保姆级seaborn教程:详细目录
图片
图片
图片
图片
图片

图片

图片

图片

图片

图片

图片

图片

交流学习

图片