You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a grid input, PyGMT functions generally accept the following input types:
a file name to a grid file, e.g., grid="input_grid.nc"
xarray.DataArray, e.g., grid=grid
more?
Although these various input data types are already used in different tutorials and examples, I think it would be better to have a standalone tutorial, explaining these input types.
Inspired by PR #1186.
For GMT CLI, there are mainly two types of input: a table or a grid. PyGMT is more powerful and can accept more input types.
For a table input, PyGMT functions generally accept the following input types:
data="input.dat"data=datax,y, e.g.,x=5.0, y=5.0xandy, e.g.,x=[1.0, 2.0], y=[3.0, 4.0]xandy, e.g.,x=np.array([1.0, 2.0]), y=np.array([3.0, 4.0])geopandas.GeoDataFrame(see Integration with geopandas to plot shapely geometries #608 & Handle geopandas and shapely geometries via geo_interface link #1000)xarray.Datasetio.StringIO(once RFC Allow for io.StringIO inputs to certain modules #576 is done)For a grid input, PyGMT functions generally accept the following input types:
grid="input_grid.nc"grid=gridAlthough these various input data types are already used in different tutorials and examples, I think it would be better to have a standalone tutorial, explaining these input types.