Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions admin/build-scientific-colors-cpt.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
#
# This script takes the downloaded zip content from
# Crameri, Fabio. (2021, September 12). Scientific colour maps
# (Version 7.0.1). Zenodo. https://doi.org/10.5281/zenodo.5501399
# Crameri, Fabio. (2023, June 14). Scientific colour maps
# (Version 8.0.0). Zenodo. https://doi.org/10.5281/zenodo.1243862
# and converts the *.cpt files into proper GMT master
# CPT files with correct attribution and hinge info
# Run from the ScientificColourMapsV directory (V is version) after the
Expand All @@ -11,8 +11,8 @@
# downloaded directory. It will create a gmt subdirectory with all the CPTs.
# You also need to edit gmt_cpt_masters.h after adding the CPTs to share/cpt
#
# Last setup and run for ScientificColourMaps7 on 02.11.2022 for GMT 6.5 (master)
# Gave 51 CPTS: The same as prior release with minor changes for categorical cpts.
# Last setup and run for ScientificColourMaps8 on June 26, 2023 for GMT 6.5 (master)
# Gave 55 CPTS: The same as release 7 with new entries glasgow, lipari, navia, managua.
#

if [ $# -eq 0 ]; then
Expand All @@ -21,21 +21,21 @@ if [ $# -eq 0 ]; then

Will create the GMT CPT versions of Crameri's scientific colour maps.
Give the full path to the expanded zip file top directory, such as
~/Download/ScientificColourMaps7.
~/Download/ScientificColourMaps8.
Before running you must update this script with:
1. Any new CPT entries since the last release to /tmp/cpt.info
2. Flag those with a soft hinge as S and a hard hinge as H
3. Manually set the current version number/doi (see the zip PDF docs)
Afterwards you must:
1. Update src/gmt_cpt_masters.h with any new entries (copy lines from /tmp/cpt_strings.txt)
2. Adding the CPTs to share/cpt (overwriting the previous versions)
2. Adding the CPTs to share/cpt/SCM (overwriting the previous versions)
3. Probably mess with doc/scripts/GMT_App_M*.sh for new layouts
EOF
exit 1
fi

DIR=$1
VERSION=7.0.1
VERSION=8.0.0
cat << EOF > /tmp/cpt.info
acton|Perceptually uniform sequential colormap, by Fabio Crameri [C=RGB]
actonS|Perceptually uniform sequential categorical colormap, by Fabio Crameri [C=RGB]
Expand All @@ -62,6 +62,7 @@ davosS|Perceptually uniform categorical colormap by Fabio Crameri [C=RGB]
devon|Perceptually uniform sequential colormap, by Fabio Crameri [C=RGB]
devonS|Perceptually uniform sequential categorical colormap, by Fabio Crameri [C=RGB]
fes|Perceptually uniform multi-sequential colormap by Fabio Crameri [H,C=RGB]
glasgow|Perceptually uniform sequential colormap by Fabio Crameri [C=RGB]
grayC|Perceptually uniform 'gray' colormap by Fabio Crameri [C=RGB]
grayCS|Perceptually uniform 'gray' categorical colormap by Fabio Crameri [C=RGB]
hawaii|Perceptually uniform lush colormap by Fabio Crameri [C=RGB]
Expand All @@ -73,6 +74,9 @@ lajollaS|Perceptually uniform categorical colormap, without black or white, by F
lapaz|Perceptually uniform 'rainbow' colormap by Fabio Crameri [C=RGB]
lapazS|Perceptually uniform 'rainbow' categorical colormap by Fabio Crameri [C=RGB]
lisbon|Perceptually uniform bimodal colormap, dark, by Fabio Crameri [S,C=RGB]
lipari|Perceptually uniform sequential colormap by Fabio Crameri [C=RGB]
managua|Perceptually uniform diverging colormap, by Fabio Crameri [S,C=RGB]
navia|Perceptually uniform sequential colormap by Fabio Crameri [C=RGB]
nuuk|Perceptually uniform, low-lightness gradient colormap, by Fabio Crameri [C=RGB]
nuukS|Perceptually uniform, low-lightness gradient categorical colormap, by Fabio Crameri [C=RGB]
oleron|Perceptually uniform topography colormap, by Fabio Crameri [H,C=RGB]
Expand Down Expand Up @@ -122,8 +126,8 @@ while read line; do
# www.fabiocrameri.ch/visualisation
#
# License: MIT License
# Copyright (c) 2021, Fabio Crameri.
# Crameri, F., (2021). Scientific colour maps. Zenodo. https://zenodo.org/record/5501399
# Copyright (c) 2023, Fabio Crameri.
# Crameri, F., (2023). Scientific colour maps. Zenodo. https://doi.org/10.5281/zenodo.1243862
# This is Scientific Colour Maps version $VERSION
# Note: Original file converted to GMT version >= 5 CPT format.
EOF
Expand Down
2 changes: 1 addition & 1 deletion doc/scripts/GMT_App_M_1a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# We have five sets of CPT figures to make:
# 1a) Our regular, traditional GMT CPTs [44]
# 1b) The regular Scientific Color Maps* [30]
# 1b) The regular Scientific Color Maps* [55]
# 1c) Categorical CPTs [18]
# 1d) Cyclic CPTs [7]
# 1e) Colormaps from cmocean [22]
Expand Down
2 changes: 1 addition & 1 deletion doc/scripts/GMT_App_M_1b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# We have five sets of CPT figures to make:
# 1a) Our regular, traditional GMT CPTs [44]
# 1b) The regular Scientific Color Maps* [30]
# 1b) The regular Scientific Color Maps* [55]
# 1c) Categorical CPTs [18]
# 1d) Cyclic CPTs [7]
# 1e) Colormaps from cmocean [22]
Expand Down
2 changes: 1 addition & 1 deletion doc/scripts/GMT_App_M_1c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# We have five sets of CPT figures to make:
# 1a) Our regular, traditional GMT CPTs [44]
# 1b) The regular Scientific Color Maps* [30]
# 1b) The regular Scientific Color Maps* [55]
# 1c) Categorical CPTs [18]
# 1d) Cyclic CPTs [7]
# 1e) Colormaps from cmocean [22]
Expand Down
2 changes: 1 addition & 1 deletion doc/scripts/GMT_App_M_1d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# We have five sets of CPT figures to make:
# 1a) Our regular, traditional GMT CPTs [44]
# 1b) The regular Scientific Color Maps* [30]
# 1b) The regular Scientific Color Maps* [55]
# 1c) Categorical CPTs [18]
# 1d) Cyclic CPTs [7]
# 1e) Colormaps from cmocean [22]
Expand Down
4 changes: 2 additions & 2 deletions doc/scripts/images.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: 522c357a54bb1eb5395bbb36a02c33ce.dir
size: 33290059
- md5: d3c6302c85c4a44c278bffd5ea8be37b.dir
size: 33307295
nfiles: 200
path: images
Loading