Skip to content
Open
Changes from all 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
33 changes: 24 additions & 9 deletions pygmt/src/ternary.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ def _ternary_frame(frame):


@fmt_docstring
@use_alias(C="cmap", G="fill", JX="width", S="style", W="pen")
@use_alias(C="cmap", S="style")
def ternary( # noqa: PLR0913
self,
data: PathLike | TableLike,
fill: str | None = None,
width: float | str | None = None,
pen: str | None = None,
alabel: str | None = None,
blabel: str | None = None,
clabel: str | None = None,
no_clip: bool = False,
region: Sequence[float | str] | str | None = None,
frame: Frame | Axis | Literal["none"] | str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
Expand All @@ -139,9 +143,13 @@ def ternary( # noqa: PLR0913

$aliases
- B = frame
- G = fill
- JX = width
- L = alabel/blabel/clabel
- N = no_clip
- R = region
- V = verbose
- W = pen
- c = panel
- p = perspective
- t = transparency
Expand All @@ -151,12 +159,10 @@ def ternary( # noqa: PLR0913
data
Pass in either a file name to an ASCII data table, a Python list, a 2-D
$table_classes.
width : str
Set the width of the figure by passing a number, followed by
a unit (**i** for inches, **c** for centimeters). Use a negative width
to indicate that positive axes directions be clock-wise
[Default lets the a, b, c axes be positive in a
counter-clockwise direction].
width
Width of the ternary diagram. Use a negative width to indicate that positive
axes directions be clock-wise [Default lets the **a**, **b**, **c** axes be
positive in a counter-clockwise direction].
region : str or list
[*amin*, *amax*, *bmin*, *bmax*, *cmin*, *cmax*].
Give the min and max limits for each of the three axes **a**, **b**,
Expand All @@ -165,7 +171,6 @@ def ternary( # noqa: PLR0913
For ternary diagrams, use :class:`pygmt.params.Frame` ``xaxis``, ``yaxis``, and
``zaxis`` attributes to set the **a**, **b**, and **c** axes, respectively.
$cmap
$fill
alabel
Set the label for the *a* vertex where the component is 100%. The label is
placed at a distance of three times the :gmt-term:`MAP_LABEL_OFFSET` setting
Expand All @@ -177,7 +182,13 @@ def ternary( # noqa: PLR0913
style : str
*symbol*\[\ *size*].
Plot individual symbols in a ternary diagram.
$pen
pen
Set pen attributes for the outlines of symbols or lines.
fill
Set color or pattern for filling of symbols [Default is no fill].
no_clip
Do not clip symbols to the ternary diagram [Default plot points whose
coordinates are strictly inside the map border].
$verbose
$panel
$perspective
Expand All @@ -189,7 +200,11 @@ def ternary( # noqa: PLR0913
labels = _labels if any(v != "-" for v in _labels) else None

aliasdict = AliasSystem(
G=Alias(fill, name="fill"),
JX=Alias(width, name="width"),
L=Alias(labels, name="alabel/blabel/clabel", sep="/", size=3),
N=Alias(no_clip, name="no_clip"),
W=Alias(pen, name="pen"),
).add_common(
B=_ternary_frame(frame),
R=region,
Expand Down
Loading