Skip to content

Conversation

@PaulWessel
Copy link
Member

This PR was "inspired" by a forum post and it seemed very easy to expand -S to do more. The new +z modifier will put a -Zvalue string in each polygon header. The value can be determined via the optional argument to +z:

a mean of triplet [Default]
l Lower value of triplet
m Median value of triplet
p Modal value of triplet
u Upper value of triplet

Added a simple test tripatch.sh which shows the various results (skipping mode since mostly will give median anyway.

tripatch

…aders

The value can be determined via the optional argument to +z:
a mean of triplet [Default]
l Lower value of triplet
m Median value of triplet
p Modal value of triplet
Upper value of triplet
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Sep 14, 2023
@PaulWessel PaulWessel added this to the 6.5.0 milestone Sep 14, 2023
@PaulWessel PaulWessel requested a review from joa-quim September 14, 2023 14:02
@PaulWessel PaulWessel self-assigned this Sep 14, 2023
n_errors += gmt_check_binary_io (GMT, 2);
n_errors += gmt_M_check_condition (GMT, Ctrl->L.binary && !GMT->common.b.active[GMT_IN], "Option -L: Cannot imply binary node input if main input is not also binary (see -bi)\n");
n_errors += gmt_M_check_condition (GMT, GMT->common.R.active[ISET] && (GMT->common.R.inc[GMT_X] <= 0.0 ||
GMT->common.R.inc[GMT_Y] <= 0.0), "Option -I: Must specify positive increment(s)\n");
Copy link
Member

@joa-quim joa-quim Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change this spaces to tabs. See how they show misaligned in the Gihub display that uses <tab> = 8 spaces

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, updated. My editor f***s me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, still wrong (but I just fixed it). It's tabs to align with the above line, followed by spaces until align with first character of the function argument whose arguments we are breaking in multi-lines.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, you and your small monitors!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has nothing to do with the monitors size. It's on code alignment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how it looks, if not using spaces where it should, when displaying with <tab> = 2 and <tab> = 8 configured in VSC.
Tab8
Tab2

@PaulWessel PaulWessel merged commit 4f3598a into master Sep 14, 2023
@PaulWessel PaulWessel deleted the tri-patches branch September 14, 2023 15:41
@PaulWessel
Copy link
Member Author

Please have it as you wish - I can adjust. I just have a "spaces to tabs" substitution but this

a) is for the entire file even though I selected a different region
b) Probably left-over code from me that only had spaces (the editor decides without me knowing)
c) the tab = n spaces also affects this.

Sorry,

@joa-quim
Copy link
Member

"spaces to tabs"

Don't do that on already formatted code. That's what screws. You can see that our code remains well aligned independently of the tab size. But for that we must follow the mix tab/spaces on continuation lines.

@maxrjones maxrjones added the add-changelog Add PR to the changelog label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants