Skip to content

Commit c91f7c3

Browse files
Meghan Jonesweiji14
andauthored
Format equation in surface docstring (#939)
Co-authored-by: Wei Ji <[email protected]>
1 parent 8e9ee3f commit c91f7c3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pygmt/src/surface.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def surface(x=None, y=None, z=None, data=None, **kwargs):
2626
Surface reads randomly-spaced (x,y,z) triples and produces gridded values
2727
z(x,y) by solving:
2828
29-
(1 - T) * L (L (z)) + T * L (z) = 0
29+
.. math:: (1 - t)\nabla^2(z)+t\nabla(z) = 0
3030
31-
where T is a tension factor between 0 and 1, and L indicates the Laplacian
32-
operator.
31+
where :math:`t` is a tension factor between 0 and 1, and :math:`\nabla`
32+
indicates the Laplacian operator.
3333
3434
Takes a matrix, xyz triples, or a file name as input.
3535
36-
Must provide either *data* or *x*, *y*, and *z*.
36+
Must provide either ``data`` or ``x``, ``y``, and ``z``.
3737
3838
Full option list at :gmt-docs:`surface.html`
3939
@@ -64,10 +64,11 @@ def surface(x=None, y=None, z=None, data=None, **kwargs):
6464
Returns
6565
-------
6666
ret: xarray.DataArray or None
67-
Return type depends on whether the outfile (G) parameter is set:
67+
Return type depends on whether the ``outfile`` parameter is set:
6868
69-
- xarray.DataArray if outfile (G) is not set
70-
- None if outfile (G) is set (grid output will be stored in outfile)
69+
- :class:`xarray.DataArray`: if ``outfile`` is not set
70+
- None if ``outfile`` is set (grid output will be stored in file set by
71+
``outfile``)
7172
"""
7273
kind = data_kind(data, x, y, z)
7374
if kind == "vectors" and z is None:

0 commit comments

Comments
 (0)