Skip to main content

A Python package providing matplotlib style for scientific plotting with traditional Chinese color palette.

Project description

cmplstyle

A Python package providing matplotlib style for scientific plotting with traditional Chinese color palette.

Installation

You can install the package using pip:

pip install cmplstyle

Features

  • A collection of 365 traditional Chinese colors.
  • Optmised matplotlib style for scientific plotting.
  • Small handy functions for helping scientific plotting.

Traditional Chinese Colors (TCC)

Our color collection is sourced from the reference 《中国传统色:国民版色卡》 by 郭浩, featuring hues widely used in traditional Chinese art and design. See here for a complete color reference.

The color names are in Chinese and their HEX color values are stored in the cmplstyle.TCC dictionary. Once the package is imported, the colors can be accessed easily by their names. For example,

import cmplstyle
import seaborn
seaborn.palplot(["群青", "西子", "胭脂", "桂黄", "苍苍", "青骊", "官绿", "米汤娇", "沧浪", "梅子青", "石榴裙"])

will plot a color palette with the specified colors in the list:

Example TCC Palette

For readers unfamiliar with Chinese characters, the colors can also be accessed by the numbered indices (TCC_1 through TCC_365). See here for a complete indexed color reference.

The package provides conversions between Chinese color names and their TCC_ indexed names: use cmplstyle.color_index_to_name to retrieve the Chinese name for a given TCC_ index, and cmplstyle.index_name_to_color to find the corresponding TCC_ index for a Chinese color name.

Built-in Matplotlib style

The package includes a built-in Matplotlib style. Activate it with:

import cmplstyle
cmplstyle.use_builtin_mplstyle()

LICENSE

This package is licensed under the MIT License.

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

cmplstyle-0.6.5.tar.gz (41.0 MB view details)

Uploaded Source

Built Distribution

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

cmplstyle-0.6.5-py3-none-any.whl (41.0 MB view details)

Uploaded Python 3

File details

Details for the file cmplstyle-0.6.5.tar.gz.

File metadata

  • Download URL: cmplstyle-0.6.5.tar.gz
  • Upload date:
  • Size: 41.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cmplstyle-0.6.5.tar.gz
Algorithm Hash digest
SHA256 2c1eb3ee946acd5aa16d41430c9640a7b23f3e3c37da414af344511e34091860
MD5 54a708d1697727ade5b27a8a60601039
BLAKE2b-256 ea9a702df26a51c003e7d7098c401f027f8413ba1e752e29dffb5849b01b553c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmplstyle-0.6.5.tar.gz:

Publisher: publish-to-test-pypi.yml on jinyiliu/cmplstyle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cmplstyle-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: cmplstyle-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 41.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cmplstyle-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2f57f7f4df1f5990f68ac851dd09cc2b7f3d8c7d9efd19d10a0191b7edcbc6a0
MD5 69eb4019c888b683c2ccb7a7603fb155
BLAKE2b-256 05a7aec60bcae7c6129a335e0037d2326aad55fa948471a10afddc7202160e43

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmplstyle-0.6.5-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on jinyiliu/cmplstyle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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