gmt
gmt copied to clipboard
Custom annotations don't work for vertical colorbars
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

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

System information
- GMT version (
gmt --version): 6.5.0_48e03e9_2022.07.02
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
