Skip to content

Commit

Permalink
Figure.text: Deprecate parameter "incols" to "use_word" (remove in v0…
Browse files Browse the repository at this point in the history
….10.0) (GenericMappingTools#1964)

* Rename 'incols' to 'use_word'
* Replace -i placeholder with -it docstring
* Add 'deprecate_parameter' for two minor releases
* Remove 'i' or 'it' from 'kwargs_to_strings'
* Adjust docstring corresponding to 'use_word=<integer>'

Co-authored-by: Dongdong Tian <[email protected]>
  • Loading branch information
2 people authored and Josh Sixsmith committed Dec 21, 2022
1 parent 0cfeb9f commit 4d1006e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pygmt.helpers import (
build_arg_string,
data_kind,
deprecate_parameter,
fmt_docstring,
is_nonstr_iter,
kwargs_to_strings,
Expand All @@ -15,6 +16,7 @@


@fmt_docstring
@deprecate_parameter("incols", "use_word", "v0.8.0", remove_version="v0.10.0")
@use_alias(
R="region",
J="projection",
Expand All @@ -33,7 +35,7 @@
e="find",
f="coltypes",
h="header",
i="incols",
it="use_word",
p="perspective",
t="transparency",
w="wrap",
Expand All @@ -45,7 +47,6 @@
font="sequence_comma",
justify="sequence_comma",
c="sequence_comma",
i="sequence_comma",
p="sequence",
)
def text_(
Expand Down Expand Up @@ -156,7 +157,10 @@ def text_(
{find}
{coltypes}
{header}
{incols}
use_word : int
Select a specific word from the trailing text, with the first
word being 0 [Default is the entire trailing text]. No numerical
columns can be specified.
{perspective}
{transparency}
``transparency`` can also be a 1d array to set varying
Expand Down

0 comments on commit 4d1006e

Please sign in to comment.