Skip to content
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

Let psxy -N be usable with binary input. #8663

Merged
merged 2 commits into from
Jan 5, 2025
Merged

Let psxy -N be usable with binary input. #8663

merged 2 commits into from
Jan 5, 2025

Conversation

joa-quim
Copy link
Member

@joa-quim joa-quim commented Jan 3, 2025

Fix issue #8606

But solution isn't perfect. For longitudes the 360-wrapping code does not let to plot outside and there is nothing we can do about it without risking to break the general longitudes wrapping.

echo 190 110 | gmtconvert -bo | gmt plot -bi -Rd -JQ10i -Baf -BWSen -N -Gred -Sc12p -png lixo

lixo

@joa-quim joa-quim requested a review from a team January 3, 2025 22:33
@@ -1403,6 +1403,8 @@ EXTERN_MSC int GMT_psxy (void *V_API, int mode, void *args) {
Return (GMT_RUNTIME_ERROR);
GMT_Report (API, GMT_MSG_DEBUG, "Operation will require %d input columns [n_cols_start = %d]\n", n_needed, n_cols_start);

if (Ctrl->N.active && GMT->common.b.active[GMT_IN]) GMT->common.b.active[2] = true; /* To signal gmtlib_process_binary_input that lats may be of |90| */
Copy link
Member

Choose a reason for hiding this comment

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

Do we make the same change to plot3d?

Copy link
Contributor

@remkos remkos left a comment

Choose a reason for hiding this comment

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

The solution looks ok by my. As @seisman said: please also implement in psxyz.c

@joa-quim
Copy link
Member Author

joa-quim commented Jan 4, 2025

Yeap, thought on that too but forgot meanwhile. Done now.

@seisman seisman merged commit 2015787 into master Jan 5, 2025
15 of 18 checks passed
@seisman seisman deleted the opt_N-binary branch January 5, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants