How can I make a scale bar for Mars?

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

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 in GMT, especially 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?

1 Like

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

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

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:

Any advice welcome! Thanks again!

Pretty neat – thanks for sharing!