Circular (slope-aspect) color scale "bar"

I want to make a slope-aspect color scale like the following:

How should I do it? Which would be the better way considering that I may want to change the values?

Humm, funny problem.
One idea (without the more painful details).

  • Take the slope and divide it into 3 categories (linear between min and max. in 3 tercils, whatever)
  • Take the azimuth and divide it into 8 classes

Now you have two grids, each one with a coordinate in a 2D system: 3 slope classes and 8 azimuths.

  • Compute the linear coordinate where rows are slopes (1:3) and columns are azimuths (1:8). For example row = 3 and column = 2 will give => (col-1)*n_rows + row = 6. Now, since may origin is your color 41 and linear coords grow radially, position 6 corresponds to color 22.
  • Create a 3rd grid with the linear indices and a categorical CPT with the24 colors and paint it.

Thanks @Joaquim. I done the map with the following commands:

gmt grdclip %SLOPE_GRID% -G%CUT% -Sb3/10 -Si3/12/20 -Si12/22/30 -Sa22/40 
gmt grdclip %ASPECT_GRID% -G%CUT2% -Sb22.5/1 -Si22.5/67.5/2 -Si67.5/112.5/3 -Si112.5/157.5/4 -Si157.5/202.5/5 -Si202.5/247.5/6 -Si247.5/292.5/7 -Si292.5/337.5/8 -Sa337.5/1
gmt grdmath %CUT% %CUT2% ADD = %CUT%

But now I want to add the above color “bar” in the map. In other words, I would need a psscale that make a circular color symbol. Hope to be clear.

I guess you would have to mimic something with psrose

@pwessel what do you think? Is there any easy way to do this? or is it only for gurus??

You can probably make that figure with the -Sw symbol rather than a grid if you want exact vector graphic result. But yes, guru territory - and you are a guru so no issue.

Is there a simpler way to do this?

gmt grdclip %SLOPE_GRID% -G%CUT% -Sb3/10 -Si3/12/20 -Si12/22/30 -Sa22/40 
gmt grdclip %ASPECT_GRID% -G%CUT2% -Sb22.5/1 -Si22.5/67.5/2 -Si67.5/112.5/3 -Si112.5/157.5/4 -Si157.5/202.5/5 -Si202.5/247.5/6 -Si247.5/292.5/7 -Si292.5/337.5/8 -Sa337.5/

To be clear. Instead of the above, to write something like this (which NOT exist, I just take the idea of -C and -T from makecpt). The “-” in the begging and in the end are for -Sb and -Sa (or MIN and MAX).

gmt grdclip %SLOPE_GRID% -G%CUT% -C10,20,30,40 -T-,3,12,22,-
gmt grdclip %ASPECT_GRID% -G%CUT2% -C1,2,3,4,5,6,7,8  -T-,22.5,67.5,112.5,157.5,202.5,247.5,292.5,337.5,-

Is it possible or should I ask for a feature request?