You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plot/plot3d: Simplify the documentation for the -A option #8645
I'm updating the documentation of this option on the PyGMT side first, then @yvonnefroehlich found an issue at GenericMappingTools/pygmt#3720 (comment), which I think is a GMT bug. Here is the CLI version just in case you want to try it:
For the GMT_STAIR_Y case, it should follow Y (meridian) first, then X (parallel), so we should create the temporary array for the line with constant longitude first, then another line with consistent latitude. However, the source code is doing it in the wrong way. The fix is straightforward.
@joa-quim@Esteban82 Could you please verify if it's indeed a bug, since the codes have been here for more than ten years and nobody complains about it.
Test sample1d/sample.sh started to fail after #8648.
Here is the comparison between the baseline image and the new image.
Baseline
Generated
The green circles are the input data, and the first point is at (-5, 74). When -Am (blue lines) is used, the data should be resampled following meridian (Y) first, then parallel (X). Apparently, in the baseline image, the lines for -Am/-Ap are incorrect.
In the image generated by the current master branch, the geographic one (upper panel) looks correct, but the Cartesian one (lower panel) is still wrong. Am I understanding it correctly?
Hmm, aren't you swapping what's wrong/right? With master (confirmed with a local run). "Generated" geog is right. "BLUE LINE: -Am mode" is right on master but not on Baseline. The inverse ... hold on ...
Lower panels show different behavior. The wither, at the top, are wrong but the narrower at the the bottom are correct.
I agree that the cartesian example is a bit too complicated. But in any case with @seisman's #8667, both the cartesian and geographic versions are correct. Thus I approved #8667
Activity
joa-quim commentedon Dec 25, 2024
Yes, it will look better that way.
seisman commentedon Dec 31, 2024
I'm updating the documentation of this option on the PyGMT side first, then @yvonnefroehlich found an issue at GenericMappingTools/pygmt#3720 (comment), which I think is a GMT bug. Here is the CLI version just in case you want to try it:
Here are the related codes:
gmt/src/gmt_vector.c
Lines 1607 to 1653 in b877d72
For the
GMT_STAIR_Ycase, it should follow Y (meridian) first, then X (parallel), so we should create the temporary array for the line with constant longitude first, then another line with consistent latitude. However, the source code is doing it in the wrong way. The fix is straightforward.@joa-quim @Esteban82 Could you please verify if it's indeed a bug, since the codes have been here for more than ten years and nobody complains about it.
Esteban82 commentedon Dec 31, 2024
Yes @seisman, it is a bug.
joa-quim commentedon Jan 1, 2025
Indeed, it's a bug.
seisman commentedon Jan 4, 2025
Test
sample1d/sample.shstarted to fail after #8648.Here is the comparison between the baseline image and the new image.
The green circles are the input data, and the first point is at (-5, 74). When
-Am(blue lines) is used, the data should be resampled following meridian (Y) first, then parallel (X). Apparently, in the baseline image, the lines for-Am/-Apare incorrect.In the image generated by the current master branch, the geographic one (upper panel) looks correct, but the Cartesian one (lower panel) is still wrong. Am I understanding it correctly?
joa-quim commentedon Jan 4, 2025
Hmm, aren't you swapping what's wrong/right? With master (confirmed with a local run). "Generated" geog is right. "BLUE LINE: -Am mode" is right on master but not on Baseline. The inverse ... hold on ...
Lower panels show different behavior. The wither, at the top, are wrong but the narrower at the the bottom are correct.
seisman commentedon Jan 4, 2025
The "Baseline" one on the left is the current
sample1d/sample.psfile, in which both panels are wrong.After #8648, we get the "Generated" one on the right, in which the "geographic" one is correct but the Cartesian one is wrong.
With PR #8667, we will get the following image, which is correct for both "geographic" and "Cartesian"

joa-quim commentedon Jan 4, 2025
I find the Cartesian example too complicate for me to understand what is right or wrong.
remkos commentedon Jan 4, 2025
I agree that the cartesian example is a bit too complicated. But in any case with @seisman's #8667, both the cartesian and geographic versions are correct. Thus I approved #8667