# Error when creating a basemap with gmt basemap

**URL:** <https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280>\
**Category:** Q&A\
**Created:** [September 25, 2023, 11:17am UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280 "2023-09-25T11:17:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OscarAncco](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/oscarancco/32/4415_2.png) [@OscarAncco](https://forum.generic-mapping-tools.org/u/OscarAncco)\
**Post date:** [September 25, 2023, 11:17am UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280/1 "2023-09-25T11:17:11Z")

</div>

![mapa](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/f/fb619630420e22d5aafa3c85faecee08cd7c0288.jpeg)

Good morning dear friends,

Sorry if this is a basic question, but I am trying to replicate the example 28 about mixing UTM and geographic datasets. I have managed to plot the DEM but I am not getting the mixed coordinates, could you please tell me where I am going wrong? My dem is in UTM 21S projected coordinates. Thank you in advance for your response. Attached image.

This is the script I used:

* * *

```
gmt begin the_axe_seamount
	# Set up a color rainbow
	gmt makecpt -Crainbow -T-1490/-290
	# Lay down the UTM topo grid using a 1:100,000 scale
	gmt grdimage the_axe_seamount.tif -I+d -Jx1:100000 --FONT_ANNOT_PRIMARY=9p
	# Overlay geographic data and coregister by using correct region and gmt projection with the same scale
	gmt coast -Rthe_axe_seamount.tif -Jutm/-21/1:100000 -Df+ -Slightblue -W0.5p -B5mg5m -BNE \
		--FONT_ANNOT_PRIMARY=12p --FORMAT_GEO_MAP=ddd:mmF
	echo 59:16:25W 62:37:54S Monte Submarino The Axe | gmt text -F+f12p,Helvetica-Bold+jCB
	gmt basemap --FONT_ANNOT_PRIMARY=9p -LjRB+c62:35S+f+w5k+l1:100,000+u+o0.5c --FONT_LABEL=10p
	# Annotate in km but append ,000m to annotations to get customized meter labels
	gmt basemap -Rthe_axe_seamount.tif+Uk -Jx1:100 -B5g5+u"@:8:000m@::" -BWSne --FONT_ANNOT_PRIMARY=10p \
		--MAP_GRID_CROSS_SIZE_PRIMARY=0.25c --FONT_LABEL=10p
gmt end show

```

* * *

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 25, 2023, 7:33pm UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280/2 "2023-09-25T19:33:23Z")

</div>

Hard to tell without knowing what went wrong. Anyway, my personal recommendation to this type of plots is [https://www.generic-mapping-tools.org/GMTjl\_doc/examples/projections/ex28/#mixing\_utm\_and\_geographic\_axes\_annotations](https://www.generic-mapping-tools.org/GMTjl_doc/examples/projections/ex28/#mixing_utm_and_geographic_axes_annotations)

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [September 25, 2023, 7:33pm UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280/3 "2023-09-25T19:33:28Z")

</div>

two things look obviously wrong:

1. you need to replace `-Slightblue` with `-Gwhite` in the `gmt coast` call cited below. Using `-Slightblue` you are painting over all water including your DEM with light blue color. `-Gwhite` paints land white instead.

```auto
	gmt coast -Rthe_axe_seamount.tif -Jutm/-21/1:100000 -Df+ -Slightblue -W0.5p -B5mg5m -BNE \
		--FONT_ANNOT_PRIMARY=12p --FORMAT_GEO_MAP=ddd:mmF

```

1. the underwater mountain label, `echo 59:16:25W 62:37:54S Monte Submarino The Axe ...` , the coordinates seem way off. Use something like `59:50:00S 62:47:00W` to get the label close to the mountain.

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [September 26, 2023, 3:27pm UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280/4 "2023-09-26T15:27:08Z")

</div>

In `gmt coast -Rthe_axe_seamount.tif -Jutm/-21/1:100000 ...` could you try `-Ju-21/1:100000` instead?

---

<div class="post-metadata">

**Author:** ![OscarAncco](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/oscarancco/32/4415_2.png) [@OscarAncco](https://forum.generic-mapping-tools.org/u/OscarAncco)\
**Post date:** [September 26, 2023, 11:29pm UTC](https://forum.generic-mapping-tools.org/t/error-when-creating-a-basemap-with-gmt-basemap/4280/5 "2023-09-26T23:29:57Z")

</div>

Thanks Joaquim, mkononets and Esteban for answering. I was able to solve it, the problem was to remove ’ \ ’ from the script lines, for some reason it generated an error, I also replaced “-Slightblue” by “-Gwhite” and modified the coordinates as suggested by mkononets. In Julia wrapper it looks simpler, I will use it.

Thank you very much for your help, you guys are brilliant!

Best regards,

Oscar
