gmt icon indicating copy to clipboard operation
gmt copied to clipboard

y-label option in subplot (-Byaf+l"...")

Open gd-a opened this issue 4 years ago • 3 comments

Hi,

> gmt --version
6.3.0_6065f93_2021.07.07

Here are three figures. Only the third one behaves as expected, the other two don't print Pa from -Byaf+l"Pa" in subplot environment :

gmt begin 
    gmt figure test_time png
        gmt subplot begin 1x2 -Fs10c -M.5c/1c -A\(a\)+JTL+o-1c/.25c -SRl -R0/11/0/3000 -JX10ct/10c -Bxa1Of1Og1O -Byaf+l"Pa"  --FORMAT_TIME_PRIMARY_MAP=abbreviated --FORMAT_DATE_MAP=o --TIME_UNIT=o
            gmt subplot set
            gmt basemap

            gmt subplot set
            gmt basemap
        gmt subplot end

    gmt figure test_zone_shift png
        gmt subplot begin 1x2 -Fs10c -M.5c/1c -A\(a\)+JTL+o-1c/.25c -SRl -R45/95/0/200 -JX10c -Byaf+l"Pa" -Bxa10f10g5+5+l"Longitude"
            gmt subplot set
            gmt basemap

            gmt subplot set
            gmt basemap
        gmt subplot end

    gmt figure test_zone_noshift png
        gmt subplot begin 1x2 -Fs10c -M.5c/1c -A\(a\)+JTL+o-1c/.25c -SRl -R140/260/0/200 -JX10c -Byaf+l"Pa" -Bxa20f10g10+l"Longitude"
            gmt subplot set
            gmt basemap

            gmt subplot set
            gmt basemap
        gmt subplot end

gmt end show

Note for the first figure (test_time.png) : when I use my data the x-axis shows "Jan - Feb - ... - Dec" as it should. I don't know why gmt basemap doesn't here.

gd-a avatar Jul 10 '21 03:07 gd-a

I up that @PaulWessel

gd-a avatar Aug 19 '21 03:08 gd-a

While the docs may not be clear on this, it seems when you use -Sr you can use +l to set the label. The cooperation between a -B on subplot begin and -S is not clear to me as I think -S takes over full control of those axes.

PaulWessel avatar Aug 27 '21 20:08 PaulWessel

But in that case, why the "-B[...]+5" phase shift out-ut a different behavior?

gd-a avatar Aug 28 '21 16:08 gd-a