Загрузка
BarContainerBarContainerContainer with all the bars and optionally errorbars, likely
returned from bar or barh.
A list of label texts, that should be displayed. If not given, the label texts will be the data values formatted with fmt.
An unnamed %-style or {}-style format string for the label or a function to call with the value as the first argument. When fmt is a string and can be interpreted in both formats, %-style takes precedence over {}-style.
The label type. Possible values:
'edge': label placed at the end-point of the bar segment, and the value displayed will be the position of that end-point.
'center': label placed in the center of the bar segment, and the value displayed will be the length of that segment. (useful for stacked bars, i.e., Bar chart with labels)
Distance of label from the end of the bar, in points. If an array-like is provided, the padding values are applied to each label individually. Must have the same length as container. .. versionadded:: 3.11
Any remaining keyword arguments are passed through to
Axes.annotate. The alignment parameters (
horizontalalignment / ha, verticalalignment / va) are
not supported because the labels are automatically aligned to
the bars.
AnnotationA list of Annotation instances for the labels.
matplotlib.pyplot.bar_label