Colorbar annotation placements

,

Hi all,
I’m having an interesting issue with plotting a colorbar. The tick marks are not aligning to the correct place on the color scale and thus there is some text that is well off the scale. You will see that I have plotted three insets below the main figure (I couldn’t quite get subplot to work for me). The colorbar is part of the middle inset, yet the 2000 annotation plots near the right inset. Based on the cpt which i set to go from 5000 to 2000, the 1000’s should be placed on the actual bar.

Secondary question: Can I set the height of a geographic map with the Mercator projection?

Tertiary Question: How can I change the thickness of the black box plotted around the colorbar?

I am using GMT 6.4 currently.

I know the full things is lengthy, but I removed all the data, paths, and variables so it should work

#!/bin/bash

gmt begin Gofar625_79_inset_TEST ps,pdf,png E720 -C

gmt gmtset PROJ_LENGTH_UNIT inch
gmt gmtset PS_MEDIA archA
gmt gmtset FONT_ANNOT_PRIMARY 8,Helvetica,black
gmt gmtset FONT_ANNOT_SECONDARY 8,Helvetica,black
gmt gmtset FONT_LABEL 8,Helvetica,black
gmt gmtset FONT_TITLE 10,Helvetica,black
gmt gmtset PS_PAGE_ORIENTATION LANDSCAPE
gmt gmtset COLOR_BACKGROUND black
gmt gmtset COLOR_FOREGROUND white
gmt gmtset COLOR_NAN white

gmt gmtset FORMAT_GEO_MAP ddd.x
gmt gmtset MAP_FRAME_WIDTH 3p
gmt gmtset MAP_ANNOT_OFFSET_PRIMARY 5p

gmt basemap -Bpxa.02f.01 -Bpya.01 -R104.9745W/104.825W/4.575S/4.529S -JM10.5i -BNSWE+t"Preliminary Bathymetry with Earthquakes" \
            -LjRT+o0.2+w2k+f+l"Scale (km)" --MAP_TICK_LENGTH=0p --MAP_ANNOT_OBLIQUE=lat_parallel -Xc -Y3.25i

gmt inset begin -R-123.5/-30/-61/31r -JS-100/0/2i -DJLB+o-2.05i/0.4i -F+gwhite+p0.5p,black
gmt basemap -R-123.5/-30/-61/31r -JS-100/0/2i -Bxa10f5 -Bya10f5 \
        --MAP_FRAME_TYPE=inside --MAP_FRAME_AXES=eslt
gmt basemap -R-123.5/-30/-61/31r -JS-100/0/2i -Bxa30 -Bya30 \
        --MAP_FRAME_TYPE=inside -BSE --FORMAT_GEO_MAP=DDDG --FONT_ANNOT_PRIMARY=4,Helvetica,black
gmt inset end

gmt inset begin -R106.5W/102.0W/5.25S/3.25S -JM5i -DJRB+o-5.05i/0.4i -F+gwhite+p0.5p,black
gmt basemap -Bpxa1f0.5 -Bpya0.5f0.5 -LjLT+o0.2+w100k+l"Scale (km)" -BSEnw \
            --MAP_FRAME_TYPE=inside --MAP_FRAME_AXES=eslt --FORMAT_GEO_MAP=ddd.x
gmt inset end

gmt inset begin -R105.2W/104.6W/4.75S/4.4S -JM3i -DJLB+o-5.25i/0.4i -F+gwhite+p0.5p,black -N
gmt makecpt -Chaxby -T-5000/-2000 -H > haxby.cpt
gmt basemap -Bpxa0.2 -Bpya0.1 -LjLT+o0.2+w10k+l"Scale (km)" -BSEnw \
            --MAP_FRAME_TYPE=inside --MAP_FRAME_AXES=eslt --FORMAT_GEO_MAP=ddd.x
gmt colorbar -Chaxby.cpt -DJCB+w2.6i/0.1i+o0.0i/0.25i+h+ml -Bxa1000f250+l"Bathymetry Depth" -By+lm
rm -f haxby.cpt
gmt inset end

gmt end show

Gofar625_79_inset_TEST.pdf (10.0 KB)

funny glitch

worked for me after duplicating -R... -J... on the colorbar call, no idea why:

gmt colorbar -R105.2W/104.6W/4.75S/4.4S -JM3i -Chaxby.cpt -DJCB+w2.6i/0.1i+o0.0i/0.25i+h+ml -Bxa1000f250+l"Bathymetry Depth" -By+lm

tested (accidentally) on gmt 6.3 and 6.5