How to color the gps velocity vector (plotted with gmt psvelo) as a cpt palette?

I’m a neophyte with GMT and I’m programming with bash.
I’ve plotted the GPS velocity vectors with gmt psvelo, but I would like to color the velocity vectors in function of their velocities with a .cpt palette.

gmt makecpt -Cdeepskyblue,blue,salmon,darkred,black -T0,10,20,30,40,50 > gps_vel.cpt
cat gps.vel.tot | awk ‘{print $2,$3,$4,$6,$5,$7,$8}’ | gmt psvelo $J $R $Se -Wdeepskyblue -Gblue -K -O >> $out

Many thank’s to those who could help me!

Add -Cgps_vel.cpt to gmt psvelo instead of -Gblue?

Thanks for reply. No, unfortunately is not run with -Cxxx.cpt

I think that you should do what @PlanetGus says and your data must be prepare:

“… it expects the user to supply a multisegment file where each segment header contains a -Z val string. The val will control the color of the line or polygon (if -L is set) via the CPT.”

Many thanks @Esteban82.
I wrote the psvelo line as:
cat gps.vel.tot | awk ‘{print $2,$3,$4,$6,$5,$7,$8}’ | gmt psvelo $J $R $Se -Wblue -Cgps_vel.cpt -L -Z -K -O >> $out

but the output is only the blue gps vectors, without a continous gradataion of the cpt. I would like that the gps vectors has colours which varies according to the velocity…

Umm I see. What GMT version are you using? Maybe you could try with psxy/plot instead of psvelo.