Rose or Compass color

Hi Community users,

is there a way to affect a color to a map rose or map compass ?

warm regards

GMT_france.pdf (128.8 KB)

Hello @Stefan,

welcome to the GMT forum :slightly_smiling_face:!

Do you mean filling the circle of the map rose or compass with a specific color? As far as I know there is no modifier for this, but playing with -F to add a box can be helpful here. By default, a rectangular box is drawn:

gmt begin rose_box png
    gmt basemap -JX5c -R-5/5/-5/5 -B+gtan -TdjMC+w2c+f1+lW,O,S,N -F
gmt end show

Using some of the available modifiers:

  • +g fill color
  • +p outline with thickness,color,style
  • +c clearance / gap
  • +r rounded eges with radius in points → use a huge value to get a circle
gmt begin rose_box_circle png
    gmt basemap -JX5c -R-5/5/-5/5 -B+gtan -TdjMC+w2c+f1+lW,O,S,N -F+gwhite+p0.1p,gray30,solid+c0.7c+r48p
gmt end show

1 Like

Hi @Stefan,

You can also play with the default GMT settings. For example, in the case of the rose exposed by @yvonnefroehlich you can set different colors to each part of the rose:

gmt begin rose_box_circle png
gmt basemap -JX5c -R-5/5/-5/5 -B+gtan -TdjMC+w2c+f1+lW,O,S,N -F+gwhite+p0.1p,gray30,solid+c1c+r57p --FONT_TITLE=8p,AvantGarde-Book,Red --MAP_DEFAULT_PEN=default,Pink --MAP_TICK_PEN_PRIMARY=thin,Green
gmt end show

It is not very intuitive but you can manage to get something pretty (not like mine).


Hi @yvonnefroehlich Yvonne,

thank you very much for your advices.

Hi @Jose-Alvarez Jose,

thanks a lot as well for your help