Feature #682

Allow pslegend symbols to take color via CPT lookup

Added by Paul about 2 years ago. Updated almost 2 years ago.

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

100%

Category:-
Target version:Candidate for next minor release
Platform:

Description

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].

Associated revisions

Revision 14137
Added by Paul about 2 years ago

Initial work on issue #682

History

#1 Updated by Paul about 2 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 almost 2 years ago

  • Status changed from Resolved to Closed

Closing this issue.

Also available in: Atom PDF