How to color line segments like this?

This is a type of vector plot with what must be presumed non-regularized (i.e., not on a grid) data.

You gave only four parameters: lon, lat, degree, and time.

Which parameter regulates the length of the vectors? Does “degree” specify the vector direction and the color? More information might help to be able to answer further.

A general question is: Which is better for plotting this kind of data? psxy or grdvector?

Using psxy might take some tricky manipulations, given how color is passed in the -W specification. The +cl modifier may be of some utility. Personally, I’ve never tried it.

Interesting question!