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

Adding API test for plotting a global matrix/grid for different central meridians #3811

Merged
merged 8 commits into from
Aug 1, 2020

Conversation

PaulWessel
Copy link
Member

Description of proposed changes

See GenericMappingTools/pygmt#515 (comment) for the backstory. This PR adds a new testapi_matrix_360.c test program in C that recreates the same type of problem. The plot with a zero central meridian looks fine but the one for 180 is not rotated to show the Pacific and has a nasty notch at Greenwhich instead. I will try to make this case work once I better understand the reason. Initial attempts to rotate the grid failed, so there is more to it.

@PaulWessel PaulWessel requested a review from seisman August 1, 2020 20:39
@PaulWessel PaulWessel added backport 6.1 Backport this PR to 6.1 branch bug Something isn't working labels Aug 1, 2020
@PaulWessel
Copy link
Member Author

Just for reference, here is the current output of testapi_matrix_360.c. The top plot should show the Pacific centered on 180.

t

@PaulWessel PaulWessel changed the title WIP Adding API test for plotting a global matrix/grid for different central meridians Adding API test for plotting a global matrix/grid for different central meridians Aug 1, 2020
@PaulWessel
Copy link
Member Author

Hi @seisman, I'd like to merge this to master even though there is no fix yet (so test will fail since no orig PS). Problem I have is it takes Xcode so long to completely cmake up a new branch, and since this branch adds a new C file I need to wipe and start fresh since otherwise it complains about missing C module (if I switch back/forth with master). So my plan is to put this into master now and then when a fix is found we can merge and backport as well. If there is no problems with this plan then please approve.

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

OK to me.

@PaulWessel PaulWessel merged commit e4538ce into master Aug 1, 2020
@PaulWessel PaulWessel deleted the new-api-test branch August 1, 2020 21:02
github-actions bot pushed a commit that referenced this pull request Aug 1, 2020
…al meridians (#3811)

* Explore passing matrix to grdimage for different central longitudes

* Update testapi_matrix_360.c

* Try rotating the grid

* Update testapi_matrix_360.c

* Add the test script

* Update gmt_api.c
PaulWessel added a commit that referenced this pull request Aug 1, 2020
…al meridians (#3811) (#3812)

* Explore passing matrix to grdimage for different central longitudes

* Update testapi_matrix_360.c

* Try rotating the grid

* Update testapi_matrix_360.c

* Add the test script

* Update gmt_api.c

Co-authored-by: Paul Wessel <pwessel@hawaii.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 6.1 Backport this PR to 6.1 branch bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants