# Colour scheme without outline

**URL:** <https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967>\
**Category:** Q&A\
**Tags:** cpt\
**Created:** [May 27, 2025, 6:39pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967 "2025-05-27T18:39:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjg](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jjg/32/2822_2.png) [@jjg](https://forum.generic-mapping-tools.org/u/jjg)\
**Post date:** [May 27, 2025, 6:39pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/1 "2025-05-27T18:39:21Z")

</div>

My objective: to create a 340x36 png image of a GMT cpt file: the following _almost_ gets me there

```auto
gmt psscale -Dx6.5/1+w340p/36p+h -B0 -Ccyclic --MAP_FRAME_PEN=0 > cyclic.eps
gmt psconvert -E72 -A+r -Tg cyclic.eps

```

But in spite of the zero frame pen, a light outline remains.

![cyclic](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/4/43e419f676ec24d5fcc3690d999cf9cd8c2a3c43.png)

I guess this is rasterisation artifact from ghostscript. Are there any tricks I can use to get rid of it?

I could make it a few pixels bigger and then shave them off with ImageMagick, but I’d really like to avoid that dependency on the processing.

Thanks in advance!

Jim

---

<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:** [May 27, 2025, 7:47pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/2 "2025-05-27T19:47:03Z")

</div>

The issue is that a `pen=0` does not mean zero thickness but a special _thinnest_ that remains with the same width independently of a zoom level (in acrobat for example). The trick I used when I wasn’t able to get rid of a frame was to plot it fully transparent.

---

<div class="post-metadata">

**Author:** ![yvonnefroehlich](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/yvonnefroehlich/32/5064_2.png) [@yvonnefroehlich](https://forum.generic-mapping-tools.org/u/yvonnefroehlich)\
**Post date:** [May 27, 2025, 8:33pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/3 "2025-05-27T20:33:06Z")

</div>

Yes, this also my trick to get ride of frames 🙂.

However, currently I it looks for me as this does not work for the frame of a colorbar (like for the frame of a basemap) as the transparency of the pen used for the frame also affects the transparency of the colorbar itself:

```auto
gmt psbasemap -R-1/1/-1/1 -JX5c -B0 --MAP_FRAME_PEN=5p,red@70 > frame.eps

```

 ![frame_cut](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/e/e92f917944970c7ab0154d6fa295c28beacda63d.png)

```auto
gmt psscale -Dx6.5/1+w340p/36p+h -B0 -Ccyclic --MAP_FRAME_PEN=5p,red@70 > cyclic.eps

```

 ![cyclic_cut](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/3/365a588abc0c6a56da50e4422fb3bf15e247e5fb.png)

And for a completely transparent frame, the colorbar is also completely transparent… 🙈

---

<div class="post-metadata">

**Author:** ![seisman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/seisman/32/4_2.png) [@seisman](https://forum.generic-mapping-tools.org/u/seisman)\
**Post date:** [May 28, 2025, 2:52am UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/4 "2025-05-28T02:52:21Z")

</div>

> [@yvonnefroehlich](#):
>
> However, currently I it looks for me as this does not work for the frame of a colorbar (like for the frame of a basemap) as the transparency of the pen used for the frame also affects the transparency of the colorbar itself:

Hmmm, this looks like a bug to me.

> [@jjg](#):
>
> But in spite of the zero frame pen, a light outline remains.

I don’t have a good solution here. Maybe you can use a white pen instead or any color that matches the background.

---

<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:** [May 28, 2025, 4:37pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/5 "2025-05-28T16:37:13Z")

</div>

I don’t have a Illustrator anymore to confirm it, but I have the impression that the border line is already burned to the image and that is why we cannot separate the transparencies.

---

<div class="post-metadata">

**Author:** ![jjg](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jjg/32/2822_2.png) [@jjg](https://forum.generic-mapping-tools.org/u/jjg)\
**Post date:** [May 28, 2025, 10:49pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/6 "2025-05-28T22:49:10Z")

</div>

I think this is actually a “real” PostScript hairline, at the end of the file, after the image block is

```auto
2 setlinecap
N 0 600 M 5667 0 D S
N 0 0 M 0 600 D S
N 5667 0 M 0 600 D S
N 0 0 M 5667 0 D S

```

inspecting the bottom left of the ps at high zoom in `gv` shows

 ![Screenshot from 2025-05-28 23-37-49](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/f/f4b07a643e830cdd5d4cc632a3bc08592515089f.png)

but when I comment those lines out:

 ![Screenshot from 2025-05-28 23-34-13](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/0/035df1243a8c7c211857c0c952aa8370d72a4c55.png)

So possibly some dirty `awk` hack will fix this …

> [@seisman](#):
>
> Hmmm, this looks like a bug to me.

It seems to violate the “principle of least surprise” 😁

---

<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:** [May 29, 2025, 10:59pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/7 "2025-05-29T22:59:41Z")

</div>

See [Fix option -B+n in psscale by joa-quim · Pull Request #8737 · GenericMappingTools/gmt · GitHub](https://github.com/GenericMappingTools/gmt/pull/8737)

---

<div class="post-metadata">

**Author:** ![jjg](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jjg/32/2822_2.png) [@jjg](https://forum.generic-mapping-tools.org/u/jjg)\
**Post date:** [May 30, 2025, 7:00pm UTC](https://forum.generic-mapping-tools.org/t/colour-scheme-without-outline/5967/8 "2025-05-30T19:00:52Z")

</div>

That’s fabulous Joaquim, thanks very much 😃
