Skip to main content

自动设置Matplotlib中文字体

Project description

chinese_matplotlib

自动设置Matplotlib支持中文字体的小工具。

功能特点

  • 自动检测当前系统可用的中文字体
  • 如果本地缺少中文字体,自动下载并安装思源黑体 (Source Han Sans SC)
  • 缓存检测结果,避免每次重复扫描
  • 支持跨平台(Windows, macOS, Linux)

安装方法

pip install chinese_matplotlib

使用

from chinese_matplotlib import set_chinese_font
set_chinese_font()

测试

from chinese_matplotlib import test_plot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chinese_matplotlib-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chinese_matplotlib-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file chinese_matplotlib-0.1.1.tar.gz.

File metadata

  • Download URL: chinese_matplotlib-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chinese_matplotlib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 aae6f99bceae8b2d3c7cd41a850f995ce7ae61ae7f6e903c788da9943e9c8704
MD5 9a40ab5b4d000e4c60494b5eb2c44cd1
BLAKE2b-256 615d776e5fe62129448472e9a54c3970b9656240957955b05c7cf02501ddfad3

See more details on using hashes here.

File details

Details for the file chinese_matplotlib-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chinese_matplotlib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bee8e62d19e53495c7678f5c67c624a2f96e8179a3b70da8b5ecabf6c2e95335
MD5 c262d65fb5e325fa487158c743f72a31
BLAKE2b-256 a68388d1afbbba86efce7841e58257cd9a4a84d3518a3c410d8cda222aaaf8d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page