Problem with background and foreground colors

Hi There,
I was trying to set the background and foreground colors of my color scale as the colors of the two extremes using makecpt with -D option, but it does not seem to work. Please see attached for my script. The black area in the plot is due to the background color remaining black. Thanks! (19.9 KB)

Running your command I get this:

gmt makecpt -Cpolar -T-4/4 -I -Do

-4 red 0 white L
0 white 4 blue B
B red
F blue
N 127.5

whie has the correct colors listed. Does your command give something different?

Yes. I also saw this when I printed the CPT to the standard out, but when you look at the figure plotted using this color scale it still shows a black area.

What GMT version? It works fine with my GMTdev version.

I was using GMT 6.0, but after I upgraded to GMT 6.1, the problem disappeared, so it is probably a bug associated with Version 6.0.