Let psvelo accept CPT and a richer way of coloring symbols#4901
Merged
PaulWessel merged 15 commits intomasterfrom Mar 4, 2021
Merged
Let psvelo accept CPT and a richer way of coloring symbols#4901PaulWessel merged 15 commits intomasterfrom
PaulWessel merged 15 commits intomasterfrom
Conversation
We can colorize a selected part of the velo symbols using a CPT.
joa-quim
approved these changes
Mar 4, 2021
weiji14
added a commit
to lhoupert/pygmt
that referenced
this pull request
Apr 5, 2021
Update docstring to include new options in `velo` from the upcoming GMT 6.2.0 that were added in GenericMappingTools/gmt#4970, GenericMappingTools/gmt#4901, and GenericMappingTools/gmt#4907. Removed the default vector="+p1p+e" argument, and formatted docstring to have nested lists to be nicer looking.
weiji14
added a commit
to GenericMappingTools/pygmt
that referenced
this pull request
Apr 30, 2021
Add `velo` function for plotting velocity vectors, crosses, anisotropy bars, and wedges. Original GMT velo function can be found at https://docs.generic-mapping-tools.org/6.1/supplements/geodesy/velo.html * clarify the type of data input * raise error if alias S is not defined * Refactor velo to use virtualfile_from_data and add three more unit tests * Alias panel (c) for velo, and lightly edit some docstrings * Alias scale (H), intensity (I) and zvalue (Z) from GMT 6.2.0 Update docstring to include new options in `velo` from the upcoming GMT 6.2.0 that were added in GenericMappingTools/gmt#4970, GenericMappingTools/gmt#4901, and GenericMappingTools/gmt#4907. Removed the default vector="+p1p+e" argument, and formatted docstring to have nested lists to be nicer looking. * Fix typos and add intersphinx mappings * Update the frame, region, projection and color of velo example * Rename alias intensity for -I to shading * Rename alias facecolor for -G to color * Move docstring for projection (J) and region (R) up a bit * Rename alias to spec (S) and update baseline images for GMT 6.2.0rc1 * Mark fig.velo tests with xfail * Rename alias uncertainty_color to uncertaintycolor for parameter E * Move velo_arrow_ellipse.py under "Seismology and Geodesy" category Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Co-authored-by: Meghan Jones <meghanrjones@users.noreply.github.com>
sixy6e
pushed a commit
to sixy6e/pygmt
that referenced
this pull request
Dec 21, 2022
Add `velo` function for plotting velocity vectors, crosses, anisotropy bars, and wedges. Original GMT velo function can be found at https://docs.generic-mapping-tools.org/6.1/supplements/geodesy/velo.html * clarify the type of data input * raise error if alias S is not defined * Refactor velo to use virtualfile_from_data and add three more unit tests * Alias panel (c) for velo, and lightly edit some docstrings * Alias scale (H), intensity (I) and zvalue (Z) from GMT 6.2.0 Update docstring to include new options in `velo` from the upcoming GMT 6.2.0 that were added in GenericMappingTools/gmt#4970, GenericMappingTools/gmt#4901, and GenericMappingTools/gmt#4907. Removed the default vector="+p1p+e" argument, and formatted docstring to have nested lists to be nicer looking. * Fix typos and add intersphinx mappings * Update the frame, region, projection and color of velo example * Rename alias intensity for -I to shading * Rename alias facecolor for -G to color * Move docstring for projection (J) and region (R) up a bit * Rename alias to spec (S) and update baseline images for GMT 6.2.0rc1 * Mark fig.velo tests with xfail * Rename alias uncertainty_color to uncertaintycolor for parameter E * Move velo_arrow_ellipse.py under "Seismology and Geodesy" category Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Co-authored-by: Meghan Jones <meghanrjones@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
So far, only a constant color fill was allowed for the symbols offered by psvelo. This PR allows the user to supply a CPT file and then use one of many criteria to look up the corresponding color. These are the improvements:
I have added a new tests exploring most of the combinations of color and fill; here is what the plot looks like: