# How to make part of the axis ticks invisible?

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376>\
**Category:** PyGMT Q&A\
**Created:** [February 24, 2021, 8:28am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376 "2021-02-24T08:28:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hzfmer](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hzfmer](https://forum.generic-mapping-tools.org/u/hzfmer)\
**Post date:** [February 24, 2021, 8:28am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376/1 "2021-02-24T08:28:12Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/79a4e4c264c69bb1f312ee1e14e7d9e73d078d4b.png)

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!

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [February 24, 2021, 8:56am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376/2 "2021-02-24T08:56:44Z")

</div>

Are you saying that -BWbrt does not work?

---

<div class="post-metadata">

**Author:** ![hzfmer](https://avatars.discourse-cdn.com/v4/letter/h/4bbf92/32.png) [@hzfmer](https://forum.generic-mapping-tools.org/u/hzfmer)\
**Post date:** [February 24, 2021, 9:29am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376/3 "2021-02-24T09:29:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [February 24, 2021, 9:44am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-part-of-the-axis-ticks-invisible/1376/4 "2021-02-24T09:44:08Z")

</div>

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