Skip to main content

Enhance data visualisations using the "jet" colormap.

Project description

Jet Killer

Jet Killer converts images using the "jet" colormap to a better one (by default "viridis") by using directly the pixel values, without any knowledge about the underlying data.

It can be used as a tool to enhance data visualizations for which the original dataset is unavailable. Use cases include :

  • enhancing figures from sources who made an unfortunate colormap choice,
  • enhancing graphs for which the original data may be lost,
  • enhancing visualizations without having to regenerate it from the original dataset.

Principle

Installation

The following command installs the jetkiller command and the jetkiller package:

pip install jetkiller

Usage

From the command line

Jet Killer is designed to be used mainly from the command line.

Use the following command to convert input_file to output_file:

jetkiller input_file output_file

If you omit the argument output_file, Jet Killer converts input_file to "output.png" by default:

jetkiller input_file

If the file "output.png" already exists, it is overwritten without any warning.

You can change the output colormap (by default "viridis") with the --colormap option. Any value from the matplotlib colormaps is recognized. Here is an example using the colormap "inferno":

jetkiller input_file output_file --colormap inferno

From Python

If you wish to use Jet Killer from Python, you can import the jetkiller package and use the jetkiller function:

import jetkiller as jk
jk.jetkiller("input_image.png", "output_image.png")

The second argument is optional and defaults to "output.png", so that you can write:

import jetkiller as jk
jk.jetkiller("input_image.png")

If the file "output.png" already exists, it is overwritten without any warning.

You can change the output colormap (by default "viridis") with the colormap arugment. Any value from the matplotlib colormaps is recognized.

import jetkiller as jk
jk.jetkiller("input_image.png", "output_image.png", colormap="inferno")

Release History

All releases of this project are listed on the tag page of this repository.

See CHANGES.md for more details on the content of each release.

Versioning

Jet Killer attempts to follow the Semantic Versioning Specification for its version numbers.

License

Jet Killer is distributed under the MIT License. See LICENSE-MIT for more details.

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

jetkiller-0.8.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

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