Skip to content

Commit 5f6460b

Browse files
Figure.text: Improve the documentation to clarify the order of columns in the input files (#2832)
Co-authored-by: Yvonne Fröhlich <[email protected]>
1 parent 78dfcf1 commit 5f6460b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pygmt/src/text.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,21 @@ def text_( # noqa: PLR0912
7676
Parameters
7777
----------
7878
textfiles : str or list
79-
A text data file name, or a list of file names containing 1 or more
80-
records with (x, y[, angle, font, justify], text).
79+
A file name or a list of file names containing one or more records.
80+
Each record has the following columns:
81+
82+
* *x*: X coordinate or longitude
83+
* *y*: Y coordinate or latitude
84+
* *angle*: Angle in degrees counter-clockwise from horizontal
85+
* *font*: Text size, font, and color
86+
* *justify*: Two-character justification code
87+
* *text*: The text string to typeset
88+
89+
The *angle*, *font*, and *justify* columns are optional and can be set
90+
by using the ``angle``, ``font``, and ``justify`` parameters,
91+
respectively. If these parameters are set to ``True``, then the
92+
corresponding columns must be present in the input file(s) and the
93+
columns must be in the order mentioned above.
8194
x/y : float or 1-D arrays
8295
The x and y coordinates, or an array of x and y coordinates to plot
8396
the text.

0 commit comments

Comments
 (0)