How to change label colors on plot axis

Hi all,

I am using GMT 6.0 on an Ubuntu 20.04LTS shell on windows 10.

I am plotting different graphs with W axis corresponding to probability density functions (PDF) and E axis to cumulative distribution function (CDF). I would like to plot the axis numbers and labels with the same color than the graph. Is it possible? (see image).

That is the scrip I am working on (using gmt subplot, there are 12 plots in total and this part of the script correspond to the first plot):

gmt plot Model_A2-Trapezoidal.txt -R300000/600000/0.0/0.002 -Bxa100000f25000+l"Age (years)" -Bya0.0005f0.0001+l"PDF" -BSWn+t"Age model" -W1.5p,steelblue2 -i0,2 -h2 -c0,0 -V
gmt plot Model_A2-Trapezoidal.txt -R300000/600000/0.0/1 -Bya0.2f0.1 -BE -W1.5p,sienna1 -i0,3 -h2 -V

Thanks for your help in advance.



Is this what you want?

Here is the script to plot the above figure.

gmt begin map png
gmt basemap -R300000/600000/0.0/0.002 -Bxa100000f25000+l"Age (years)" -BSn+t"Age model"
gmt basemap -R300000/600000/0.0/0.002 -Bya0.0005f0.0001+l"PDF" -BW \
  --MAP_FRAME_PEN=steelblue2 --MAP_TICK_PEN=steelblue2 \
  --FONT_LABEL=steelblue2 --FONT_ANNOT=steelblue2
gmt basemap -R300000/600000/0.0/1 -Bya0.2f0.1+l"CDF" -BE \
  --MAP_FRAME_PEN=sienna1 --MAP_TICK_PEN=sienna1 \
  --FONT_LABEL=sienna1 --FONT_ANNOT=sienna1
gmt end show

Generally, you can change pen and font settings (see gmt.conf — GMT 6.5.0 documentation for a long list of possible settings).


Thanks so much for the ultra fast answer! That’s what I wanted. So, all is done changing the gmt defaults, perfect.

Let me ask, why basemap instead of plot?

Let me ask, why basemap instead of plot?

Because I don’t have some data to plot. Both basmeap and plot work, as the frame, ticks, labels are controlled by the -B option, which works the same way in all GMT plotting modules.

Understood. Thanks again.