How to make part of the axis ticks invisible?

Thank you!

It’s my bad! I didn’t realize that works in PyGMT as well.

Do you by any chance know how to keep the black gridlines in the colorbar; while labeling integers only, as shown in the example figure? E.g. gmt colorbar -Dx0c/-1c+w7c/0.4c+h will hav labels “0, 0.5, 1, 1.5, …”, which is too dense; but gmt colorbar -Dx0c/-1c+w7c/0.4c+h -Ba1 will remove the gridlines, which makes the discrete colors less distinguishable.