Container for the artists created in a :meth:`.Axes.stem` plot. The container can be treated like a namedtuple ``(markerline, stemlines, baseline)``. Attributes ---------- markerline : `~matplotlib.lines.Line2D` The artist of the markers at the stem heads. ste
| 221 | |
| 222 | |
| 223 | class StemContainer(Container): |
| 224 | """ |
| 225 | Container for the artists created in a :meth:`.Axes.stem` plot. |
| 226 | |
| 227 | The container can be treated like a namedtuple ``(markerline, stemlines, |
| 228 | baseline)``. |
| 229 | |
| 230 | Attributes |
| 231 | ---------- |
| 232 | markerline : `~matplotlib.lines.Line2D` |
| 233 | The artist of the markers at the stem heads. |
| 234 | |
| 235 | stemlines : `~matplotlib.collections.LineCollection` |
| 236 | The artists of the vertical lines for all stems. |
| 237 | |
| 238 | baseline : `~matplotlib.lines.Line2D` |
| 239 | The artist of the horizontal baseline. |
| 240 | """ |
| 241 | def __init__(self, markerline_stemlines_baseline, **kwargs): |
| 242 | """ |
| 243 | Parameters |
| 244 | ---------- |
| 245 | markerline_stemlines_baseline : tuple |
| 246 | Tuple of ``(markerline, stemlines, baseline)``. |
| 247 | ``markerline`` contains the `.Line2D` of the markers, |
| 248 | ``stemlines`` is a `.LineCollection` of the main lines, |
| 249 | ``baseline`` is the `.Line2D` of the baseline. |
| 250 | """ |
| 251 | markerline, stemlines, baseline = markerline_stemlines_baseline |
| 252 | self.markerline = markerline |
| 253 | self.stemlines = stemlines |
| 254 | self.baseline = baseline |
| 255 | super().__init__(markerline_stemlines_baseline, **kwargs) |