Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Jul 17, 2020

Description of proposed changes

grdimage doesn't always work well for xarray grids. It works for some projection parameters, but not others (also see #515). It possibly relates to an upstream GMT bug.

The grdtrack gallery examples gives the wrong result on Linux and crashes on macOS. This PR changes the region and projection parameters to make the example work on both Linux and macOS, so that the documentation can be built and show the correct image.

See https://pygmt-cvvmhke34.vercel.app/gallery/grid/track_sampling.html#sphx-glr-gallery-grid-track-sampling-py for the new output image.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

@seisman seisman changed the title Fix the grdtrack example to avoid crashes Fix the grdtrack example to avoid crashes on macOS Jul 17, 2020
@seisman seisman marked this pull request as ready for review July 17, 2020 20:24
@seisman seisman requested a review from weiji14 July 17, 2020 20:24
@weiji14 weiji14 added the bug Something isn't working label Jul 17, 2020
@seisman seisman added this to the 0.2.x milestone Jul 17, 2020
@seisman seisman added the documentation Improvements or additions to documentation label Jul 17, 2020
@seisman seisman merged commit d8c91d7 into master Jul 17, 2020
@seisman seisman deleted the fix-grdtrack-example branch July 17, 2020 20:51
weiji14 added a commit that referenced this pull request Sep 5, 2020
Remove workarounds added because plotting grids
across the dateline would crash, not needed since
bumping minimum required GMT version to 6.1.1.

* Revert runfirst workaround for test_grdimage_over_dateline
* Revert grdtrack example workaround in #531 crashing due to bad meridian
* Remove unneeded pytest mpl_image_compare and runfirst markers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants