Enhancements to pslegend
|Target version:||Candidate for next minor release|
These are ideas from Kristof Koch, modulated by me, to yield actionable changes:
- 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].
- 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.
- 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.
#1 Updated by Remko over 5 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 5 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.