Bug #996

makecpt - how do I get RGB in numbers only?

Added by Alan about 1 year ago. Updated 12 months ago.

Status:ClosedStart date:2016-11-08
Priority:NormalDue date:
Assignee:Remko% Done:

100%

Category:-Estimated time:1.00 hour
Target version:Candidate for next bugfix release
Affected version:5.3.1 Platform:

Description

I am trying to write CPT files with RGB color model but I want numbers only in the output, not color names. I am using the following command and getting the following output:

$ makecpt -Crainbow -T1./3./.1 -V -Z -I -Fr
makecpt: Prepare CPT via the master file rainbow
makecpt: CPT is continuous
1 red 1.1 255/63.75/0
1.1 255/63.75/0 1.2 darkorange1
1.2 darkorange1 1.3 255/191.25/0
1.3 255/191.25/0 1.4 yellow
1.4 yellow 1.5 191.25/255/0
1.5 191.25/255/0 1.6 chartreuse
1.6 chartreuse 1.7 63.75/255/0
1.7 63.75/255/0 1.8 green
1.8 green 1.9 0/255/63.75
1.9 0/255/63.75 2 0/255/127.5
2 0/255/127.5 2.1 0/255/191.25
2.1 0/255/191.25 2.2 cyan
2.2 cyan 2.3 deepskyblue
2.3 deepskyblue 2.4 0/127.5/255
2.4 0/127.5/255 2.5 0/63.75/255
2.5 0/63.75/255 2.6 blue
2.6 blue 2.7 63.75/0/255
2.7 63.75/0/255 2.8 127.5/0/255
2.8 127.5/0/255 2.9 191.25/0/255
2.9 191.25/0/255 3 magenta
B white
F black
N 127.5

Any ideas? This wasn't an issue in prior GMT releases (pre-GMT5).

Many thanks.

History

#1 Updated by Joaquim about 1 year ago

  • Status changed from New to Closed

Sorry, Bug reports is no place to ask question. We have a forum for that

#2 Updated by Remko about 1 year ago

  • Estimated time set to 1.00

Not so fast, Joaquim, I think Alan has a valid bug report.

The makecpt manual says about the -Fr option that it should product r/g/b codes only. And it does not do that.

Hence, I would like to reopen the issue.

#3 Updated by Joaquim about 1 year ago

I'm not able to reopen it either.
But note that this issue was presented as question and questions go to the forum. If they prove to raise a buggy behavior than an issue is opened.

It looks like one have to open a new one (done)

#4 Updated by Paul about 1 year ago

  • Status changed from Closed to In Progress
  • Target version set to Candidate for next bugfix release

#5 Updated by Remko about 1 year ago

  • Status changed from In Progress to Feedback

Indeed, the makecpt -Fr did no longer work as expected, i.e., "known" colors were replaced by a text string, in stead of kept as an RGB code. Similarly -Fh and -Fc did no longer work. All was defaulted to -FR.

This incorrect working of -F was fixed with r17324 for GMT 5.3 and r17325 for GMT 5.4.

Furthermore, if you want to have the space back between the RGB values, simply run the output through tr, e.g.

makecpt -Crainbow -T1./3./.1 -V -Z -I -Fr | tr '/' ' '

#6 Updated by Paul 12 months ago

  • Status changed from Feedback to Closed
  • Assignee set to Remko
  • % Done changed from 0 to 100

Closed as fixed.

Also available in: Atom PDF