Skip to content
Merged
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
18 changes: 12 additions & 6 deletions pygmt/src/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
A="horizontal",
D="annotate",
F="center",
G="fill",
L="extreme",
N="distribution",
Q="cumulative",
S="stairs",
T="series",
W="pen",
Z="histtype",
b="binary",
d="nodata",
Expand All @@ -45,6 +43,8 @@ def histogram(
bar_width: float | str | None = None,
bar_offset: float | str | None = None,
cmap: str | bool = False,
pen: str | None = None,
fill: str | None = None,
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
frame: Frame | Axis | Literal["none"] | str | Sequence[str] | bool = False,
Expand All @@ -64,10 +64,12 @@ def histogram(
$aliases
- B = frame
- C = cmap
- E = bar_width, bar_offset
- E = bar_width, **+o**: bar_offset
- G = fill
- J = projection
- R = region
- V = verbose
- W = pen
- c = panel
- i = incols
- p = perspective
Expand All @@ -79,9 +81,11 @@ def histogram(
Pass in either a file name to an ASCII data table, a Python list, a 2-D
$table_classes.
$cmap
fill : str
pen
Draw bar outline (or stair-case curve) using the specified pen thickness
[Default is no outline].
fill
Set color or pattern for filling bars [Default is no fill].
$pen
annotate : bool or str
[**+b**][**+f**\ *font*][**+o**\ *off*][**+r**].
Annotate each bar with the count it represents. Append any of the
Expand All @@ -95,7 +99,7 @@ def histogram(
either an alternative width in data units, or the user may append a
:ref:`dimension unit <dimension-units>` for a fixed dimension instead.
bar_offset
Shift all bars along the axis by *offset*. It may be given in data units
Shift all bars along the axis by a constant value. It may be given in data units
of plot dimension units by appending the relevant unit.
center : bool
Center bin on each value. [Default is left edge].
Expand Down Expand Up @@ -169,6 +173,8 @@ def histogram(
Alias(bar_width, name="bar_width"),
Alias(bar_offset, name="bar_offset", prefix="+o"),
],
G=Alias(fill, name="fill"),
W=Alias(pen, name="pen"),
).add_common(
B=frame,
J=projection,
Expand Down
Loading