Skip to content

This script allows you to change an image (.jpg/.png) file made with jet colormap to any other colormap of your choice. The script selectively changes jet colors only. All others colors in the image remain unchanged (including background and text).

License

Notifications You must be signed in to change notification settings

kkraoj/fixthejet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fixthejet

Information is not knowledge.

Information can be transformed into knowledge by consuming it in a way to understand patterns. One of the primary ways to consume large quantities of information is through pictures: charts, plots, maps that convey the message. Before, 2015, many such figures were inadvertantly prepared using a color scheme called jet that is visually stimulating due to the abundance of colors. Unfortunately, we have come to know of the harm it causes only recently. The jet is not perceptually uniform which is a fancy way of saying what you see is not what you get. The colormap is known to create artificial gradients in perceptibility which can mislead interpretations of figures. It is also extremely unfriendly to people with colorblindness. For more information check out the presentation of launch of the new default colormaps in matpltolib.

This script allows you to change an image (.jpg/.png) file made with jet colormap to any other colormap of your choice. The script selectively changes jet colors only. All others colors in the image remain unchanged (including background and text).

Installation

Type the following in terminal or command line.

git clone https://github.com/kkraoj/fixthejet.git

cd fixthejet

pip install -r requirements.txt

Running

python fixthejet.py --input <input file> --output <output file>

Use --colormap <output colormap> to control colormap of outfile. Default is viridis. Only Matplotlib colormaps supported.

Prerequisites

Python 3 Package requisites are in requirements.txt

Example 1

python fixthejet.py --input .\images\SST.png --output .\images\SST_viridis.png

Input file

input1

Output file

output1

Example 2

python fixthejet.py --input .\images\cube.png --output .\images\cube_plasma.png --colormap plasma

Input file

input2

Output file

output2

Example 3

python fixthejet.py --input .\images\cone.jpg --output .\images\cone_inferno.jpg --colormap inferno

Input file

input2

Output file

output2

License

GPL-3.0 License

Acknowledgments

About

This script allows you to change an image (.jpg/.png) file made with jet colormap to any other colormap of your choice. The script selectively changes jet colors only. All others colors in the image remain unchanged (including background and text).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages