GenericMappingTools / GenericMappingTools/pygmt

Consistent table-like input for PyGMT functions/methods

Open
#2,731 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
874
Forks
255
Avg merge
1d 21h
Merged PRs (30d)
40

Description

xref https://github.com/GenericMappingTools/pygmt/issues/1318 and https://github.com/GenericMappingTools/pygmt/pull/2722.

When working on the tutorial for table inputs in PyGMT, I realized that the behavior of table inputs are still inconsistent.

Generally speaking, there are two different ways to pass tables into PyGMT: via `data` or via `x`/`y`/`z`. For `data`, it can be a file, a pandas.DataFrame, a 2-D NumPy array. Currently, some functions/methods don't support x/y/z. We need to check all methods/functions to make sure they have consistent behavior for table inputs.

This issue is a central place to track the progress. Here is the list of methods/functions that we may need to check:

- [ ] `binstats`
- [ ] `blockm*`
- [x] `contour` [`data` or `x`/`y`/`z`]
- [ ] `filter1d`
- [ ] `grdtrack`
- [ ] `histogram`
- [ ] `info`
- [ ] `legend`
- [ ] `meca`
- [ ] `nearneighbor`
- [ ] `plot`
- [ ] `plot3d`
- [ ] `project`
- [x] `rose` [`data` or `length`/`azimuth`]
- [ ] `select`
- [ ] `sph2grd`
- [ ] `sphdistance`
- [ ] `sphinterpolate`
- [x] `surface` [`data` or `x`/`y`/`z`]
- [ ] `ternary`
- [ ] `text`
- [x] `triangulate` [`data` or `x`/`y`/`z`]
- [ ] `velo`
- [x] `wiggle` [`data` or `x`/`y`/`z`]
- [x] `xyz2grd` [`data` or `x`/`y`/`z`]
- [ ] `x2sys_cross`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.