diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 2141eab7ffd..793726b0468 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -25,7 +25,6 @@ F="center", L="extreme", N="distribution", - Q="cumulative", S="stairs", T="series", Z="histtype", @@ -45,6 +44,7 @@ def histogram( cmap: str | bool = False, pen: str | None = None, fill: str | None = None, + 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, @@ -67,6 +67,7 @@ def histogram( - E = bar_width, **+o**: bar_offset - G = fill - J = projection + - Q = cumulative - R = region - V = verbose - W = pen @@ -112,10 +113,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 + Draw a cumulative histogram. Set it to ``"reverse"`` to draw the reverse + cumulative histogram instead. extreme : str **l**\|\ **h**\|\ **b**. The modifiers specify the handling of extreme values that fall outside @@ -174,6 +174,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,