Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jpcm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpcm

A perceptually uniform colormap generator for Matplotlib equipped with traditional-ish Japanese colors to serve as a fixed color palette. Designed to allow unique colormap generation.

  • 0.1.25
  • PyPI
  • Socket score

Maintainers
1

perceptual-jp-colormaps

A perceptually uniform colormap generator for Matplotlib equipped with traditional-ish Japanese colors to serve as a fixed color palette.
Additions are welcome.
Python package

Why perceptually uniform colormaps? Can you not just use default Matplotlib colormaps?

  • non-perceptually uniform colormaps induce dangerous artifacts, as seen in the below image: top-view of pyramid. The left colormap introduces new features to the data.
  • Matplotlib perceptually uniform colormaps are simply not visually appealing and sometimes lack enough contrast. With this package, anyone can design colormaps to fit their visual style.

dependencies:

  • Python3:
    -- colour-science
    -- numpy -- logging
    -- scipy
    -- json
    -- pynverse
    -- matplotlib

tested on:

  • Windows 10
  • Linux
  • Python 3.8, 3.10, 3.12

expected to work on:

  • MacOS
  • all Python >=3.6 (support available for >=3.8)

install:

  • pip3 install jpcm or download source

run generator:

  • to create your own colormaps
    • as a package:
      • import jpcm
      • jpcm.register() will register all default colormaps and any additional ones via the optional custom_maps argument. Note any custom_maps should be of the following format (note the RGB key colors):
        cmaps = { 'def' : [[0,0,0],[255,0,0]], }
      • The optional datafile argument will cause jpcm to save all colormaps to that location as well.
    • directly via code:
      • edit maps.py with your preferred cmap styles, and run python3 gen.py or python3 gen.py --readme from /gen/

load colormaps:

  • import jpcm
  • jpcm.open(<filename>) will return a dictionary containing all the colormaps in the file at .
  • Note the file should be of the same type as the generated 'cmap.txt' from the generator













FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc