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

Upgrade events and meca, coupe, velo to handle new scaling column #4970

Merged
merged 10 commits into from
Mar 16, 2021

Conversation

PaulWessel
Copy link
Member

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.

@PaulWessel PaulWessel self-assigned this Mar 16, 2021
@PaulWessel PaulWessel merged commit 8863228 into master Mar 16, 2021
@PaulWessel PaulWessel deleted the meccoupvelo-scale branch March 16, 2021 20:45
@PaulWessel
Copy link
Member Author

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.

@Esteban82
Copy link
Member

I re run my animation and I haven't any problem or modification on it.

@maxrjones maxrjones linked an issue Mar 17, 2021 that may be closed by this pull request
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let events plot more complicated symbols via meca, velo, etc.
3 participants