Parameters ---------- values : array-like The step heights. edges : array-like The edge positions, with ``len(edges) == len(vals) + 1``, between which the curve takes on vals values. orientation : {'vertical', 'horizontal
(self, values, edges, *,
orientation='vertical', baseline=0, **kwargs)
| 1133 | |
| 1134 | @_docstring.interpd |
| 1135 | def __init__(self, values, edges, *, |
| 1136 | orientation='vertical', baseline=0, **kwargs): |
| 1137 | """ |
| 1138 | Parameters |
| 1139 | ---------- |
| 1140 | values : array-like |
| 1141 | The step heights. |
| 1142 | |
| 1143 | edges : array-like |
| 1144 | The edge positions, with ``len(edges) == len(vals) + 1``, |
| 1145 | between which the curve takes on vals values. |
| 1146 | |
| 1147 | orientation : {'vertical', 'horizontal'}, default: 'vertical' |
| 1148 | The direction of the steps. Vertical means that *values* are |
| 1149 | along the y-axis, and edges are along the x-axis. |
| 1150 | |
| 1151 | baseline : float, array-like or None, default: 0 |
| 1152 | The bottom value of the bounding edges or when |
| 1153 | ``fill=True``, position of lower edge. If *fill* is |
| 1154 | True or an array is passed to *baseline*, a closed |
| 1155 | path is drawn. |
| 1156 | |
| 1157 | **kwargs |
| 1158 | `Patch` properties: |
| 1159 | |
| 1160 | %(Patch:kwdoc)s |
| 1161 | """ |
| 1162 | self.orientation = orientation |
| 1163 | self._edges = np.asarray(edges) |
| 1164 | self._values = np.asarray(values) |
| 1165 | self._baseline = np.asarray(baseline) if baseline is not None else None |
| 1166 | self._update_path() |
| 1167 | super().__init__(self._path, **kwargs) |
| 1168 | |
| 1169 | def _update_path(self): |
| 1170 | if np.isnan(np.sum(self._edges)): |
nothing calls this directly
no test coverage detected