Skip to content

Custom annotations don't work for vertical colorbars #6846

Closed

Description

@seisman

Description of the problem

Custom annotations work for horizontal colorbars

gmt begin colorbar png
cat > Time_scale.txt << EOF
2021-01-01T00:00:00 a Jan 01
2021-03-01T00:00:00 a Mar 01
2021-05-01T00:00:00 a May 01
2021-07-01T00:00:00 a Jul 01
2021-09-01T00:00:00 a Sept 01
2021-10-05T00:00:00 a Oct 05
EOF
    gmt makecpt -Cseis -T2021-01-01T00:00:00/2021-10-05T00:00:00 -Ic
    gmt colorbar -C -D+w12c/0.3c+h+ma -Bpxc"Time_scale.txt"+l'Original Time' -F+gwhite+p0.5p,black
gmt end show

colorbar

But it doesn't work for vertical colorbars:

gmt begin colorbar png
cat > Time_scale.txt << EOF
2021-01-01T00:00:00 a Jan 01
2021-03-01T00:00:00 a Mar 01
2021-05-01T00:00:00 a May 01
2021-07-01T00:00:00 a Jul 01
2021-09-01T00:00:00 a Sept 01
2021-10-05T00:00:00 a Oct 05
EOF
    gmt makecpt -Cseis -T2021-01-01T00:00:00/2021-10-05T00:00:00 -Ic
    gmt colorbar -C -D+w12c/0.3c+v+ma -Bpxc"Time_scale.txt"+l'Original Time' -F+gwhite+p0.5p,black
gmt end show

colorbar

System information

  • GMT version (gmt --version): 6.5.0_48e03e9_2022.07.02

Activity

  1. added
    bug
    on Jul 3, 2022
  2. seisman commented on Jul 3, 2022

    @seisman
    MemberAuthor

    I just tried to change -Bpxc to -Bpyc. It still doesn't work as I expect:

    gmt begin colorbar png
    cat > Time_scale.txt << EOF
    2021-01-01T00:00:00 a Jan 01
    2021-03-01T00:00:00 a Mar 01
    2021-05-01T00:00:00 a May 01
    2021-07-01T00:00:00 a Jul 01
    2021-09-01T00:00:00 a Sept 01
    2021-10-05T00:00:00 a Oct 05
    EOF
        gmt makecpt -Cseis -T2021-01-01T00:00:00/2021-10-05T00:00:00 -Ic
        gmt colorbar -C -D+w12c/0.3c+v+ma -Bpyc"Time_scale.txt"+l'Original Time' -F+gwhite+p0.5p,black
    gmt end show
    

    colorbar

  3. joa-quim commented on May 31, 2026

    @joa-quim
    Member

    Fixed by #9044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions