How to make part of the axis ticks invisible?

Hi all,
I would like to make some plots like:

The problem is if I use “BW”, the ticks and the borders will both disappear; while what I want is the box without ticks or ticklabels.
It would be great if the solution, if any, also works in PyGMT!
Thank you!

Are you saying that -BWbrt does not work?

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.

Just turn on whatever gridline interval you want by adding g int. It is just a regular -B option, no?