File: colormaps.md

package info (click to toggle)
mintpy 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,340 kB
  • sloc: python: 39,151; javascript: 6,880; sh: 376; makefile: 16
file content (79 lines) | stat: -rw-r--r-- 3,107 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
## Custom colormaps

MintPy support the following colormaps:

+ [Matplotlib colormaps](https://matplotlib.org/stable/tutorials/colors/colormaps.html)
+ Custom colormaps: `cmy`, `dismph`, and `romanian`
+ Custom colormaps in **.cpt** (color palette tables) format. To add your own colormap, drop the corresponding .cpt file in `$MINTPY/mintpy/data/colormaps`.

We recommend to use cyclic colormap `cmy` for wrapped phase/displacement measurement.

<p align="left"><a href="https://insarlab.github.io/figs/docs/mintpy/cmap_cmy.png">
  https://insarlab.github.io/figs/docs/mintpy/cmap_cmy.png</a>
</p>

To use colormap `cmy` in view.py:

```bash
view.py velocity.h5 -c cmy
```

To use colormap `cmy` in python:

```python
from mintpy.colors import ColormapExt
cmap = ColormapExt('cmy').colromap
```

### Colormaps from [GMT](http://www.soest.hawaii.edu/gmt/) ###

All GMT cpt files, e.g. the 20 built-in colormaps shown below, can be recognized by setting the variable `GMT_CPT_DIR` in `$MINTPY_HOME/src/mintpy/objects/colors.py`. The default hardwired value is `/opt/local/share/gmt/cpt` for macOS users with GMT installed using [MacPorts](https://www.macports.org).

<p align="left"><a href="https://docs.generic-mapping-tools.org/5.4/_images/GMT_App_M_1a.png">
  https://docs.generic-mapping-tools.org/5.4/_images/GMT_App_M_1a.png</a>
</p>

<p align="left"><a href="https://docs.generic-mapping-tools.org/5.4/_images/GMT_App_M_1b.png">
  https://docs.generic-mapping-tools.org/5.4/_images/GMT_App_M_1b.png</a>
</p>

### Colormaps from [cpt-city](http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/totp-cpt.html) ###

The following colormaps is included by default:

+ BlueWhiteOrangeRed
+ DEM_print
+ differences
+ GMT_haxby
+ GMT_no_green
+ seminf-haxby
+ temp-c
+ temperature
+ wiki-2.0
+ wiki-schwarzwald-d050
+ wiki-scotland
+ More at [cpt-city](http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/totp-cpt.html)

### Colormaps from [Scientific Color-Maps](http://www.fabiocrameri.ch/colourmaps.php) by Fabio Crameri ###

The following colormaps is included by default:

+ batlow (the scientific rainbow)
+ hawaii
+ oleron (surface topography)
+ roma (seismic tomography)
+ vik (diverging)
+ vikO (cyclic diverging)
+ More at [Scientific Color-Maps](http://www.fabiocrameri.ch/colourmaps.php) ([Crameri, 2018](https://doi.org/10.5194/gmd-11-2541-2018))

<p align="left"><a href="https://insarlab.github.io/figs/docs/mintpy/cmap_scientific_colour_maps_fabiocrameri.jpg">
  https://insarlab.github.io/figs/docs/mintpy/cmap_scientific_colour_maps_fabiocrameri.jpg</a>
</p>

### Interactive [web tool](https://jdherman.github.io/colormap/) to generate custom colormaps by Jon Herman ###

This web tool creates a custom colormap (for Matplotlib/Matlab) by dragging points on the RGB intensity curves.

+ Choose output as *plaintext* style and *RGB* format.
+ Copy and save the RGB table to a text file
+ Use this script [rgb2cpt.py](https://github.com/yuankailiu/utils/blob/main/trivia/rgb2cpt.py) to convert the RGB table to 8-column CPT file with heading, overrule background, foreground, and NaN colors.