I am using GMT6.4.0. I could successfully plot colored points according to rgb color palette.
My result is below.
My problem is when I am trying to insert the color scale. The figure is corrupted.
Could you please help me? My GMT script is below.
rem xyz2grd depths.txt -Gtest.grd -R24/38/21.5/33.5 -I1m -V
surface depths.txt -Gtest.grd -R24/38/21.5/33.5 -I1m -V
grd2cpt test.grd -Crainbow -L0.0/175.2 -S0.01/1.3/0.01 -Qi -D0.0/175.2 > rgb
rem nearneighbor depths.txt -Gtest.grd -R24/38/21.5/33.5 -I1m -V -S100k
pscoast -Jm0.4i -R24/38/21.5/33.5 -Ba5f0.g0./a5f0.g0.WSen -Lf26.5/22.7/20/200 -Df -A1 -W1p -Ir/1p,turquoise1 -P -V -Swhite -K >> testmap.ps
psscale -Dx8c/1c+w12c/0.5c+jTC+h -Jm -R -Q -O -Crgb -Bx5+lDepth -By+lkm >> testmap.ps
psxy motion.txt -Jm -R -Sc -Crgb -V -O -K >> testmap.ps
psxy station.txt -Jm -R -S -V -Wthin,red -O >> testmap.ps
psconvert -Tg -P -A testmap.ps

