# Makecpt creating empty cpt

**URL:** <https://forum.generic-mapping-tools.org/t/makecpt-creating-empty-cpt/1095>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [November 29, 2020, 8:50pm UTC](https://forum.generic-mapping-tools.org/t/makecpt-creating-empty-cpt/1095 "2020-11-29T20:50:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmonroe](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jmonroe](https://forum.generic-mapping-tools.org/u/jmonroe)\
**Post date:** [November 29, 2020, 8:50pm UTC](https://forum.generic-mapping-tools.org/t/makecpt-creating-empty-cpt/1095/1 "2020-11-29T20:50:36Z")

</div>

Hello, I am trying to color my Sonde Locations according to their name so that I can include a legend in my figure that has the color and name for each point (there are only 6 of them). Currently, they are just filled in red which isn’t helpful for seeing which points are which. This is the code I currently have.

```
gmt makecpt -Ccategorical -Sr -i2 Edited_Locations.xy > Sonde_Locations.cpt
gmt plot Edited_Locations.xy -Sc0.1 -CSonde_Locations.cpt -l"Sondes"+jTR+o-1.5i/0i

```

When running my command, I get an error for plot saying that Sonde\_Locations.cpt has no z-slices. A cpt with 0 bytes is made so I’m sure the error is from plot referencing an empty cpt. I’m thinking maybe makecpt isn’t the right way to go about this as the names are strings instead of values. Could this be accomplished in plot? I’ve attached a screenshot of my .xy file.

 ![Capture92](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/2462a9107683f76b32e85ab6c988b55d1b2a6d9e.png)

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [November 29, 2020, 9:17pm UTC](https://forum.generic-mapping-tools.org/t/makecpt-creating-empty-cpt/1095/2 "2020-11-29T21:17:35Z")

</div>

There is no z-values in your \*xy file so makecpt -Sr -i2 cannot work. I understand what you are trying to do but that mode has not been implemented. However, we recently updated makecpt -F to simply creating categorical files given a list of keys or a file with keys, but you will need to build from master in the repo to access these features now.

---

<div class="post-metadata">

**Author:** ![jmonroe](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jmonroe](https://forum.generic-mapping-tools.org/u/jmonroe)\
**Post date:** [November 29, 2020, 9:30pm UTC](https://forum.generic-mapping-tools.org/t/makecpt-creating-empty-cpt/1095/3 "2020-11-29T21:30:45Z")

</div>

Thank you for your response!
