Cyclic CPT offset

Added by Federico 6 months ago

I want to make an aspect map so I use a cyclic CPT, but I want to shift the colours of the CPT.
So I make a cyclic CPT from -180 to 180 to obtained the desired colour distribution.

gmt makecpt -Ccyclic -T-180/180/1 -Z -Ww > color.cpt

But then, when I plot the scale (psscale) the values goes from -180 to 180 (upper figure) and I want the values from 0 to 360 (like the lower figure).


Replies (3)

RE: Cyclic CPT offset - Added by Paul 6 months ago

Not sure what you want. You cannot make a cpu from -180/+180 and somehow have it plot from 0/360 since those are not the boundaries of the CPT. Do you mean that your data is in -180/+180 range but you want a 0-360 cpt and thus angles like -90 should have the color indicated by 270? Cant you use separate CPTs for plotting and scale to achieve this?

RE: Cyclic CPT offset - Added by Federico 6 months ago

I want to get a cyclic CPT (figure) in wich the values goes from 0 to 360 and, for example, red corresponds to 180 (or another value) instead of 0 (like in the master cylcic CPT).

For the CPT in the figure I manually edited the CPT (color2.cpt). How can I avoid this step?

Wanted_Cyclic_CPT.png - Figure (7.36 KB)

color2.cpt - Manually edited CPT (878 Bytes)

RE: Cyclic CPT offset - Added by Paul 6 months ago

You can't. The rainbow color starts at red. So if you want to break that you have to do what you did. You should be able to assemble your CPT via two calls to makecpt using -G and -T and append.

(1-3/3)