diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index b06e4b15737..7603415aa3d 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -24,7 +24,6 @@ F="center", L="extreme", N="distribution", - Q="cumulative", S="stairs", T="series", Z="histtype", @@ -45,6 +44,7 @@ def histogram( pen: str | None = None, fill: str | None = None, horizontal: bool = False, + cumulative: bool | Literal["reverse"] = False, projection: str | None = None, region: Sequence[float | str] | str | None = None, frame: Frame | Axis | Literal["none"] | str | Sequence[str] | bool = False, @@ -68,6 +68,7 @@ def histogram( - E = bar_width, **+o**: bar_offset - G = fill - J = projection + - Q = cumulative - R = region - V = verbose - W = pen @@ -113,10 +114,9 @@ def histogram( * 0 = mean and standard deviation [Default]; * 1 = median and L1 scale (1.4826 \* median absolute deviation; MAD); * 2 = LMS (least median of squares) mode and scale. - cumulative : bool or str - [**r**]. - Draw a cumulative histogram by passing ``True``. Use **r** to display - a reverse cumulative histogram. + cumulative + Pass ``True`` to draw a cumulative histogram, or set it to ``"reverse"`` to draw + a reverse cumulative histogram instead. extreme : str **l**\|\ **h**\|\ **b**. The modifiers specify the handling of extreme values that fall outside @@ -176,6 +176,7 @@ def histogram( Alias(bar_offset, name="bar_offset", prefix="+o"), ], G=Alias(fill, name="fill"), + Q=Alias(cumulative, name="cumulative", mapping={"reverse": "r"}), W=Alias(pen, name="pen"), ).add_common( B=frame,