# Understanding the pygmt makecpt command

**URL:** <https://forum.generic-mapping-tools.org/t/understanding-the-pygmt-makecpt-command/3268>\
**Category:** PyGMT Q&A\
**Tags:** gmt\
**Created:** [September 12, 2022, 8:20pm UTC](https://forum.generic-mapping-tools.org/t/understanding-the-pygmt-makecpt-command/3268 "2022-09-12T20:20:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktripa](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ktripa/32/2084_2.png) [@ktripa](https://forum.generic-mapping-tools.org/u/ktripa)\
**Post date:** [September 12, 2022, 8:20pm UTC](https://forum.generic-mapping-tools.org/t/understanding-the-pygmt-makecpt-command/3268/1 "2022-09-12T20:20:57Z")

</div>

Hi there!  
I am struggling to understand the pygmt.makecpt() method in pygmt ([https://www.pygmt.org/latest/api/generated/pygmt.makecpt.html](https://www.pygmt.org/latest/api/generated/pygmt.makecpt.html)). The command is  
**pygmt.makecpt(**\*, _transparency=None_, _cmap=None_, _background=None_, _color\_model=None_, _truncate=None_, _output=None_, _reverse=None_, _overrule\_bg=None_, _no\_bg=None_, _log=None_, _series=None_, _verbose=None_, _categorical=None_, _cyclic=None_, _continuous=None_, **_kwargs_ )**

I am able to understand few arguments such as transparency, background, etc. But the major commands such as **cmap** and **color\_model** are elusive. I simply use the following simple commands to generate colormaps, but its difficult to make customized colorbars with these cpt.  
`gmt.makecpt(cmap="jet", series=[0, 1, 0.1],reverse=False, background='o')`

If someone can help this by providing an example, this would be really helpful.

Thank you  
Regards  
Kumar

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [September 14, 2022, 1:00pm UTC](https://forum.generic-mapping-tools.org/t/understanding-the-pygmt-makecpt-command/3268/2 "2022-09-14T13:00:41Z")

</div>

cmap stands for “color map”, which is a standard denomination for the color schemes.

For example `cmap=hot` uses color gradients from red to black , `rainbow` uses rainbow colors, `gray` uses shades of gray (from whitish to blackish) … so on (you can find them in the doc)

`color_model` refers to the encoding used ([RGB or HSV](https://docs.generic-mapping-tools.org/dev/gmt.conf.html#term-COLOR_MODEL)).

I advise to read the [GMT Doc](https://docs.generic-mapping-tools.org/dev/makecpt.html#description) concerning the makecpt module to get a better grasp of the options and their meaning.
