# How to get rid of just the map frame?

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144>\
**Category:** Q&A\
**Created:** [July 25, 2023, 9:03am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144 "2023-07-25T09:03:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jidanni](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jidanni/32/3164_2.png) [@jidanni](https://forum.generic-mapping-tools.org/u/jidanni)\
**Post date:** [July 25, 2023, 9:03am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/1 "2023-07-25T09:03:58Z")

</div>

[We see](https://docs.generic-mapping-tools.org/dev/cookbook/features.html#id21) the black box pointed to by the words MAP\_FRAME\_PEN.  
I want to make that black box disappear, without changing any other  
aspects. I.e., I still want ticks and annotations, etc., just not that  
black box.

[We note](https://docs.generic-mapping-tools.org/dev/cookbook/features.html#specifying-pen-attributes) 0 means faint and there is no way to say “none.”

`--MAP_FRAME_PEN=0,white` still gives a thin white line, but I want **no** line.

Sure,  
–[MAP\_FRAME\_WIDTH](https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-MAP_FRAME_WIDTH)=0p  
alas, my map ins’t a “fancy” map.

Seems that none of these will help me achieve my goal, no matter what I  
set them to:

```auto
$ gmt defaults|grep MAP_FRAME
MAP_FRAME_AXES = WESNZ
MAP_FRAME_PEN = thicker,black
MAP_FRAME_PERCENT = 100
MAP_FRAME_TYPE = fancy
MAP_FRAME_WIDTH = 5p

```

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [July 25, 2023, 11:21am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/2 "2023-07-25T11:21:34Z")

</div>

The trick here is to plot the frame line with a white (and preferably fully transparent) line.

---

<div class="post-metadata">

**Author:** ![jidanni](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jidanni/32/3164_2.png) [@jidanni](https://forum.generic-mapping-tools.org/u/jidanni)\
**Post date:** [July 26, 2023, 9:46am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/3 "2023-07-26T09:46:16Z")

</div>

Thanks, but well, white and even transparency would still be just a _trick_ / **hack** that fails depending on the background,

 ![20230726T043757](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/6/62b0e06d0c93dc098bf7cf7cabfab3e855e4c403.jpeg)  
or when the image format doesn’t support transparency.

So MAP\_FRAME\_WIDTH needs to be ~~fixed~~ enhanced so it doesn’t fail on non-fancy maps.

Else it should be called FANCY\_MAP\_FRAME\_WIDTH etc.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [July 26, 2023, 6:38pm UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/4 "2023-07-26T18:38:41Z")

</div>

I use that trick in the Julia wrapper and it works fine.

And please, that abuse of “needs to be fixed” is a bit annoying to say the least.

---

<div class="post-metadata">

**Author:** ![jidanni](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jidanni/32/3164_2.png) [@jidanni](https://forum.generic-mapping-tools.org/u/jidanni)\
**Post date:** [July 28, 2023, 9:05am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/5 "2023-07-28T09:05:32Z")

</div>

I created [https://github.com/GenericMappingTools/gmt/issues/7691](https://github.com/GenericMappingTools/gmt/issues/7691) .

---

<div class="post-metadata">

**Author:** ![jidanni](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jidanni/32/3164_2.png) [@jidanni](https://forum.generic-mapping-tools.org/u/jidanni)\
**Post date:** [August 4, 2023, 10:18am UTC](https://forum.generic-mapping-tools.org/t/how-to-get-rid-of-just-the-map-frame/4144/6 "2023-08-04T10:18:00Z")

</div>

OK, it is possible:

```auto
gmt begin
for i in "g -238" "f 90"
do
    set $i
    gmt basemap -B$1 -R3+uk -JoA-87/42/$2/1:100000
done
gmt end show

```

 ![g](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/d/defdb64af30eb2553287d850a2afc69473c053c3.png)  
I got “rid” of the tilted map’s frame.
