Feature #682

Allow pslegend symbols to take color via CPT lookup

Added by Paul over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2015-02-27
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:Candidate for next minor release


This feature request derives from the comments in Using the SV symbol in a legend - possible bug?. Symbols plotted in pslegend expects a specific fill value (e.g., red, 128, or 255/13/56) or - to indicate no fill. Sometimes it is more convenient to use a CPT table to look up what a color should be via the z-value, as elsewhere in GMT. E.g.,
gmt psxy -C<cpt> -Sc0.1i

plots circles whose color is based on the cpt file and the 3rd input column's z-value). I propose two enhancements to pslegend:
  1. A new option -A<cptfile> to specify a cptfile to be used for color lookup purposes.
  2. Symbol fill may be specified via z=<value>, which would trigger the CPT lookup and replace the entry with the corresponding color. Alternatively, perhaps just =<value> is enough [some flag is needed to distinguish shade entries from z-values].


#1 Updated by Paul over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Implemented in r14140 (GMT 5.2.0 branch) via a new special command A cptfile. This is better than a command line option -A since a user can now switch from one cpt to another in the middle of a legend. I added the test script test/pslegend/zlegend.sh to make sure the new feature works.

#2 Updated by Paul over 6 years ago

  • Status changed from Resolved to Closed

Closing this issue.

Also available in: Atom PDF