-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grdsample: Fix the incorrect handling of -Am and -Ap #8667
Conversation
@@ -446,7 +446,7 @@ GMT_LOCAL uint64_t gmtvector_fix_up_path_cartesian (struct GMT_CTRL *GMT, double | |||
if (step <= 0.0) step = 1.0; /* Sanity valve; if step not given we set it to 1 */ | |||
|
|||
for (i = 1; i < n; i++) { | |||
if (mode == GMT_STAIRS_Y) { /* First follow x, then y */ | |||
if (mode == GMT_STAIRS_X) { /* First follow x, then y */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if
-statement should check mode == GMT_STAIR_X
, because at lines 455, the y values are constant and the x values are changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and with GMT_STAIRS_Y = 1, GMT_STAIRS_X = 2, that matches now all the comments.
As a matter of fact, I met this issue once, but thought I had made a user error.
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit 8a57876 |
@@ -446,7 +446,7 @@ GMT_LOCAL uint64_t gmtvector_fix_up_path_cartesian (struct GMT_CTRL *GMT, double | |||
if (step <= 0.0) step = 1.0; /* Sanity valve; if step not given we set it to 1 */ | |||
|
|||
for (i = 1; i < n; i++) { | |||
if (mode == GMT_STAIRS_Y) { /* First follow x, then y */ | |||
if (mode == GMT_STAIRS_X) { /* First follow x, then y */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and with GMT_STAIRS_Y = 1, GMT_STAIRS_X = 2, that matches now all the comments.
As a matter of fact, I met this issue once, but thought I had made a user error.
See #8645 (comment) for context.
This PR fixes the sample1d -Am|-Ap issue.