# How can I make a scale bar for Mars?

**URL:** <https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [January 3, 2021, 10:29am UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168 "2021-01-03T10:29:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaiastucky](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@gaiastucky](https://forum.generic-mapping-tools.org/u/gaiastucky)\
**Post date:** [January 3, 2021, 10:29am UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/1 "2021-01-03T10:29:59Z")

</div>

Hi,  
I frequently plot regional maps of Mars in degrees. The only problem is that I don’t know how to make a scale bar (e.g., in kilometers) since everything is scaled for Earth. I usually do this manually on Illustrator after plotting on GMT, but I would like to know whether it is possible to do in GMT, to save time and increase accuracy?  
Thanks,  
Gaia

---

<div class="post-metadata">

**Author:** ![KristofKoch](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kristofkoch/32/314_2.png) [@KristofKoch](https://forum.generic-mapping-tools.org/u/KristofKoch)\
**Post date:** [January 3, 2021, 12:25pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/2 "2021-01-03T12:25:34Z")

</div>

Hi @gaiastucky, welcome to the forum! I’m not quite sure what your problem is – you said “everything is scaled for earth” in your post. Did you switch the projection ellipsoid to Mars? If you don’t explicitly specify it GMT defaults to WGS84.

See the [documentation on user-definable parameters](https://docs.generic-mapping-tools.org/dev/gmt.conf.html) in GMT, especially [`PROJ_ELLIPSOID`](https://docs.generic-mapping-tools.org/dev/gmt.conf.html#term-PROJ_ELLIPSOID) where you find

> - _Mars_: Mars (IAU2000) (2000)

as an possible option. Usage is simple, just include `--PROJ_ELLIPSOID=Mars` in your call. Now you are on Mars and your scale bar should have the proper dimensions.

Did this solves your problem?

---

<div class="post-metadata">

**Author:** ![gaiastucky](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@gaiastucky](https://forum.generic-mapping-tools.org/u/gaiastucky)\
**Post date:** [January 4, 2021, 2:16pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/3 "2021-01-04T14:16:06Z")

</div>

Hi @KristofKoch,  
This is exactly what I was looking for. I thought had searched for Mars options in the documentation but somehow I missed this.  
Thank you so much for your time and for providing the specific line I can include in my scripts!  
Gaia

---

<div class="post-metadata">

**Author:** ![KristofKoch](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kristofkoch/32/314_2.png) [@KristofKoch](https://forum.generic-mapping-tools.org/u/KristofKoch)\
**Post date:** [January 4, 2021, 5:59pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/4 "2021-01-04T17:59:49Z")

</div>

You’re welcome! Glad I could help. Are you able to show a sneak peek of your work?

---

<div class="post-metadata">

**Author:** ![gaiastucky](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@gaiastucky](https://forum.generic-mapping-tools.org/u/gaiastucky)\
**Post date:** [January 5, 2021, 12:27pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/5 "2021-01-05T12:27:14Z")

</div>

Hi @KristofKoch,  
Sure! It’s just a simple topo map of a lake system I am investigating. Nothing fancy, I just wanted to have the freedom to play with illumination and cpts to make the key features I’m mapping ‘stand out’ . I have set various variables, e.g.,

> gmt set PROJ\_ELLIPSOID=Mars

at the start, but haven’t included them below.

> mola=“./Data/grids/mola\_clp.nc” #Topography from MOLA  
> themis=“./Data/grids/themis\_clp.nc” #Imagery from THEMIS  
> rgn=“-R44.75/46.25/1.6/3.5” #region to plot / make grids  
> proj=“-JQ4.5i” #simple projection

> gmt psbasemap $rgn $proj -Ba1f0.5:‘’:/a1f0.5:‘’:WsNe -Y8i -X1i -K \> $out.ps  
> gmt grdimage ${mola} $rgn proj -I{themis} -Ccpts/earth-mod.cpt -Ba0 -t0 -O -K \>\> $out.ps  
> gmt psscale -I -Dx4.65i/0i+w5.7i/0.15i+e -Bx2af -By+lkm -Ccpts/earth-mod.cpt -Np -O -K \>\> $out.ps  
> echo a | gmt pstext $rgn $proj -F+f20p,Helvetica-Bold+cTL -C4p -D4p/-4p -Gwhite -O -K \>\> $out.ps  
> gmt psbasemap $rgn $proj -Ba0 -Beswn -O -Lx3.6i/5.5i+c0+w10k -Tdx4.22i/5.3i+w0.75i \>\> $out.ps

I end up with something like this:

[[Album] imgur.com ![](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/76b2e2abdf6d6a793dcca7d44c00990ffdd8bae4.jpeg "imgur.com") ](https://imgur.com/a/xZBQclu)

Any advice welcome! Thanks again!

---

<div class="post-metadata">

**Author:** ![KristofKoch](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kristofkoch/32/314_2.png) [@KristofKoch](https://forum.generic-mapping-tools.org/u/KristofKoch)\
**Post date:** [January 6, 2021, 12:58am UTC](https://forum.generic-mapping-tools.org/t/how-can-i-make-a-scale-bar-for-mars/1168/6 "2021-01-06T00:58:24Z")

</div>

Pretty neat – thanks for sharing!
