-
Notifications
You must be signed in to change notification settings - Fork 362
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
Upgrade events and meca, coupe, velo to handle new scaling column #4970
Merged
Conversation
This file contains 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
Same as for plot and plot3d.
maxrjones
approved these changes
Mar 16, 2021
While it should not affect any user, just pining @Esteban82 so he knows there has been some code changes and let me know if anything changed in his movies. |
I re run my animation and I haven't any problem or modification on it. |
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>
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
Along the lines of the upgrades to plot and plot3d, this PR lets meca, coupe, and velo have the same new -H[scale] option. This allows these modules, like plot and plot3d, to scale a symbol and its pen using -H. The events module was upgraded (and simplified in the process) to no longer worry about if -S has a symbol size of not. If it does not then the user presumably has a size column, otherwise it is a constant. Regardless of that, events will add a scaling column and pass -H to the module for plotting symbols so that as these change size, both the symbol size and the pen attributes change accordingly.
Both psxy and psxyz needed some more work to deal with ellipses and rectangles since those dimensions were not in S.size_x. These upgrades were required to make the events examples and movies work.
All tests pass and I checked that anim08 and anim09 still work.