Bug #1143

psscale inserts a random color when cropping with -G

Added by Leonardo 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:2017-08-11
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:

Description

I wanted to use just the green portion of the dem1 CPT for a grdimage plot of topography.

What I did was scale my CPT to include some negative values not present in my dataset:

gmt makecpt -Cdem1 -Ic -T-2500/1250 > topo.cpt

After plotting my data, I insert a colorbar using psscale. However, I want the colorbar to only include the values that are actually present in my data, so I crop it using -G:

gmt psscale -R0/10/0/10 -JX4i/4i -DjCC+h -P -Ctopo.cpt -By+lm -Bxa250 -G0/NaN > figure.ps

For some reason, this inserts a blue color in my colorbar (see attached). This is very strange because there isn't any blue in dem1. It doesn't happen if I remove -G.

I'm using trunk (18674).

psscale-bug-plot.jpg (25.5 KB) Leonardo, 2017-08-11 10:03

History

#1 Updated by Paul 2 months ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Fixed in r18687. Failed to recompute RGB difference array for the truncated slice.

#2 Updated by Paul about 1 month ago

  • Status changed from Resolved to Closed

Closed as fixed.

Also available in: Atom PDF