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.0.tar.gz (3.4 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.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chinese_matplotlib-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 c59882031e2006d92f7fff0c92c3e487480658d3ef3fbf1fe930cac45630617d
MD5 cbf2f604101812af8ade6ef9c9e2d050
BLAKE2b-256 14b381c89033b4cf21fde1c5a7bf62d0144c1464285a40b3c116ed1379772844

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chinese_matplotlib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58726a6a8d48e5aa126e3b74d432d84f9241d9d9c5ce53848a0c0985107779e1
MD5 578a2901800837476c8996ba3de958af
BLAKE2b-256 89829fc753ebfe7ea053d09c50e71d9ee240b652998e28ff252e53318b70dcfb

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