Skip to main content

Using matplotlib with tranditional Chinese word more easily.

Project description

mpltw is a convience tool for using python's matplotlib module with tranditional Chinese word.

It simply do three things:

  1. help you with downloading the Taipei Sans TC Beta (Regular) font in this module.
  2. setup matplotlib to use this font as default.
  3. add pyplot just for convience.

How to install

You can use pip:

pip install mpltw

Or from gitlab for master branch:

pip install git+https://gitlab.com/scku208/matplotlib-taiwan-font

How to use

import mpltw

And then...

from matplotlib import pyplot as plt
plt.plot([1,2,3],[4,5,6], label='不用去記是prop...')
plt.title('聽說其實台北黑體裡也有日文...您好/こんにちは')
plt.xlabel('還是fontdict...')
plt.text(1, 5,'text:亦或是fontproperties…')
plt.annotate(r'annotation:通通都不用管了  \0皿0/耶~', xy=(2.5,5), xytext=(1.8,4.25),arrowprops=dict(facecolor='black', shrink=0.05))
plt.legend() #這也是prop
plt.show()

Or simply...

from mpltw import plt 
# using plt to do plotting things...

demo 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

mpltw-0.1.0.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

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

mpltw-0.1.0-py3-none-any.whl (10.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mpltw-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.3

File hashes

Hashes for mpltw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 180de5984d369d540dd24ee788df67572327b918690c800d03ab1f22a20519f5
MD5 5871d4039a8da548e6aff8c213a08f5c
BLAKE2b-256 7823b8cc42ff7105605413c338630dc1266672f0359b6eba25334f357748559b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpltw-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.3

File hashes

Hashes for mpltw-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3891f1e1d58e467cdb105b6280c815c1095b2f3603fc48fab8671d1b809aec6
MD5 6ff3ceaf41eb6ace40eca14d7bb10f70
BLAKE2b-256 b9c1f6c96c1851134abc8f0008809140698664b2a21734b3136c12fe3019163e

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