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

Finalize 2nd vectest #156

Merged
merged 2 commits into from
Oct 29, 2018
Merged

Finalize 2nd vectest #156

merged 2 commits into from
Oct 29, 2018

Conversation

PaulWessel
Copy link
Member

Show use of CPT to paint a vector head and/or stem, plus optional head outline. Finalize the test and add original PS for test comparison.

SHow use of CPT to paint a vector head and/or stem, plus optional head outline.
@PaulWessel PaulWessel requested a review from a team October 28, 2018 21:10
@@ -1,15 +1,14 @@
#!/bin/bash
# Test shrinking vector heads, part 2
# Get fill and pen color via CPT on z values
# Unable to have a fixed head outline color separate from stem color
# Get fill and/or pen color via CPT on z values
gmt begin shrinkvec2 ps
gmt math -T0/2/0.1 -o1,0 0 = | awk '{printf "%s\t%s\t%s\t0\t%si\n", $1, $2, $2, $2}' > data.txt
gmt makecpt -Cjet -T0/2 > t.cpt
# Use z and CPT for painting the head only
gmt psxy data.txt -R0/1/0/2.1 -JX2i/9i -Sv0.5i+ea+h0.4+jb+n2i -W3p+cf -Ct.cpt -B -BWStr
Copy link
Member

Choose a reason for hiding this comment

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

Should use plot instead of psxy in modern mode.

Old habits are hard to kill
Copy link
Member

@joa-quim joa-quim left a comment

Choose a reason for hiding this comment

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

We are not testing modern mode here so, on the contrary, I think the test should be pure classic to focus on what is being tested. But I don't mean to imply that the test should be changed.

@PaulWessel PaulWessel merged commit 82686b5 into master Oct 29, 2018
@PaulWessel PaulWessel deleted the morevectests branch October 29, 2018 00:27
obaney pushed a commit to obaney/gmt that referenced this pull request Aug 18, 2021
Implements the function `load_earth_relief` in `gmt.datasets` to load
the Earth relief grids distributed with GMT (the `@earth_relief_XXm` 
special file names). Uses `gmt.which` to download to the user directory 
and get the file name. The netCDF grid is loaded and returned as an 
xarray.DataArray. Only support the 60 to 1 arc-minute global grids. 
Higher resolution arc-second grids are served as tiles and are usually
cut to a specific area, so a `region` argument will be needed to load
these grids later, probably in conjunction with `gmt.grdcut`.
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.

None yet

3 participants