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

Wrapper for grdview #328

Closed
weiji14 opened this issue Sep 23, 2019 · 0 comments · Fixed by #330
Closed

Wrapper for grdview #328

weiji14 opened this issue Sep 23, 2019 · 0 comments · Fixed by #330
Labels
feature request New feature wanted
Milestone

Comments

@weiji14
Copy link
Member

weiji14 commented Sep 23, 2019

Description of the desired feature

Implement grdview which "Creates 3-D perspective image or surface mesh from a grid". Basically a 3D version of 'grdimage` that was wrapped in #124. Below is an example of such a 3D plot:

grdview teaser

The grdview function fits in with the rest of the Plotting modules and shouldn't be too hard to implement. I've created heaps of 3D perspective plots before for my thesis using GMT5 and definitely found the plot quality and features a lot nicer than matplotlib. This will be a great addition for people working with contours and DEM surfaces and brings PyGMT into the 3D realm!

Code-wise, I'll stick to using the earth_relief_grid for the unit tests. As for the aliases, I'm thinking of using 'perspective' for -p and 'zscaling' for -Jz (though unsure how to handle -JZ). -Q seems to be worth aliasing but I can't come up with a good name...

Are you willing to help implement and maintain this feature? Yes

weiji14 referenced this issue in weiji14/pygmt Sep 29, 2019
Initial commit for wrapping the grdview function raised at #328, to be implemented under base_plotting.py alongside the other mapping related stuff. Original GMT `grdview` documentation can be found at https://docs.generic-mapping-tools.org/latest/grdview.html.

Storing sample test cases under test_grdview.py. Current implementation takes in a reliefgrid either as a filename or xarray.DataArray. Aliased the 'required' arguments 'Jz' to 'zscale' and 'JZ' to 'zsize' (similar to GMT julia wrappper). Also aliased 'p' to 'perspective' (as is standard in upstream GMT) so that we can have some 3D test plots to compare against, instead of just some flat (birds-eye view) maps.
@weiji14 weiji14 mentioned this issue Sep 29, 2019
19 tasks
@weiji14 weiji14 added the feature request New feature wanted label Oct 1, 2019
@weiji14 weiji14 added this to the 0.1.0 milestone Oct 4, 2019
weiji14 added a commit that referenced this issue Mar 26, 2020
Wrapping the grdview function raised at #328, to be implemented under base_plotting.py. Original GMT `grdview` documentation can be found at https://docs.generic-mapping-tools.org/latest/grdview.html. Storing sample test cases under test_grdview.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant