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

Figure.text: Improve the documentation to clarify the order of columns in the input files #2832

Merged
merged 5 commits into from
Dec 5, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,21 @@ def text_( # noqa: PLR0912
Parameters
----------
textfiles : str or list
A text data file name, or a list of file names containing 1 or more
records with (x, y[, angle, font, justify], text).
A file name or a list of file names containing one or more records.
Each record has the following columns:

* *x* : X coordinate or longitude
* *y* : Y coordinate or latitude
* *angle* : Angle in degrees counter-clockwise from horizontal
* *font* : Text size, font, and color
* *justify* : Two-character justification code
* *text* : The text string to typeset
seisman marked this conversation as resolved.
Show resolved Hide resolved

The *angle*, *font*, and *justify* columns are optional and can be set
by using the ``angle``, ``font``, and ``justify`` parameters,
respectively. If these parameters are set to ``True``, then the
corresponding columns must be present in the input file(s) and the
columns must be in the order mentioned above.
x/y : float or 1-D arrays
The x and y coordinates, or an array of x and y coordinates to plot
the text.
Expand Down