Fix the grdtrack example to avoid crashes on macOS #531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andprojection
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
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.