Feature #556

Enhancements to pslegend

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

Status:ClosedStart date:2014-05-07
Priority:NormalDue date:
Assignee:Paul% Done:

100%

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

Description

These are ideas from Kristof Koch, modulated by me, to yield actionable changes:

  1. Allow for variable column widths, e.g. N 25-5-10.5-58.5-1, where we have 5 columns with uneven width [Default is same width].
  2. Add new operator F fill that can change the background fill for the current row, and remain in effect until another F fill call. The fill argument can be
    fill : A single fill for the entire row, or - to turn fill off.
    fill1/fill2/... Separate fills for each column, use - for no fill for any of the columns.
    In general, fill is the usual GMT fill, i.e., colors or patterns.
  3. Enable modifier to draw debug guide lines, i.e., add +d to -F. Code already has this built-in but requires debug activation. Change this to be controlled by the proposed +d modifier.

Associated revisions

Revision 13118
Added by Paul over 3 years ago

Implemented but not tested some of issue #556

History

#1 Updated by Remko over 3 years ago

Those sound like useful additions. But wouldn't the syntax be N 25/5/10.5/58.5/1? I assume these are meant to be percentages. But I think any relative number should work, like N 1/1/2/2 to have two narrow and two wide columns (twice the width of the narrow ones).

#2 Updated by Paul over 3 years ago

  • Status changed from New to In Progress

Yes, the N operator should not take hyphens. In fact, since fill arguments can have slashes (patterns) and hyphens (h-s-v) the F operator must instead separate fills by whitespace (F fill1 fill2 ... filln). The N operator therefore should use the same syntax (N relwidth1 relwidth2 ... relwidthn). I have implemented N and F that way, plus the +d debug modifier in -D. No testing whatsoever yet (apart from compiling). Some questions remain: What cells should be allowed to be filled? Only those with symbols and labels? Any vertical space? Right now I allow fill for label columns, symbol columns, beneath the color bar and map scale, and header. What about gaps, horizontal lines? Cannot easily do color behind paragraph text since the height is computed by the PS operators. users can use the -F+g<fill> to set a background fill and we only overwrite the ones listed. In r13118.

#3 Updated by Paul over 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

For the record, the extension of N, the introduction of F, and the new modifier +d have all been implemented in the 5.2 branch. In r13131.

#4 Updated by Paul over 3 years ago

  • Status changed from Resolved to Closed

Closing this as done.

Also available in: Atom PDF