Parameters ---------- segments : list of (N, 2) array-like A sequence ``[line0, line1, ...]`` where each line is a (N, 2)-shape array-like containing points:: line0 = [(x0, y0), (x1, y1), ...] Each line can contain a diff
(self, segments, # Can be None.
*,
zorder=2, # Collection.zorder is 1
**kwargs
)
| 1727 | _edge_default = True |
| 1728 | |
| 1729 | def __init__(self, segments, # Can be None. |
| 1730 | *, |
| 1731 | zorder=2, # Collection.zorder is 1 |
| 1732 | **kwargs |
| 1733 | ): |
| 1734 | """ |
| 1735 | Parameters |
| 1736 | ---------- |
| 1737 | segments : list of (N, 2) array-like |
| 1738 | A sequence ``[line0, line1, ...]`` where each line is a (N, 2)-shape |
| 1739 | array-like containing points:: |
| 1740 | |
| 1741 | line0 = [(x0, y0), (x1, y1), ...] |
| 1742 | |
| 1743 | Each line can contain a different number of points. |
| 1744 | linewidths : float or list of float, default: :rc:`lines.linewidth` |
| 1745 | The width of each line in points. |
| 1746 | colors : :mpltype:`color` or list of color, default: :rc:`lines.color` |
| 1747 | A sequence of RGBA tuples (e.g., arbitrary color strings, etc, not |
| 1748 | allowed). |
| 1749 | antialiaseds : bool or list of bool, default: :rc:`lines.antialiased` |
| 1750 | Whether to use antialiasing for each line. |
| 1751 | zorder : float, default: 2 |
| 1752 | zorder of the lines once drawn. |
| 1753 | |
| 1754 | facecolors : :mpltype:`color` or list of :mpltype:`color`, default: 'none' |
| 1755 | When setting *facecolors*, each line is interpreted as a boundary |
| 1756 | for an area, implicitly closing the path from the last point to the |
| 1757 | first point. The enclosed area is filled with *facecolor*. |
| 1758 | In order to manually specify what should count as the "interior" of |
| 1759 | each line, please use `.PathCollection` instead, where the |
| 1760 | "interior" can be specified by appropriate usage of |
| 1761 | `~.path.Path.CLOSEPOLY`. |
| 1762 | |
| 1763 | **kwargs |
| 1764 | Forwarded to `.Collection`. |
| 1765 | """ |
| 1766 | # Unfortunately, mplot3d needs this explicit setting of 'facecolors'. |
| 1767 | kwargs.setdefault('facecolors', 'none') |
| 1768 | super().__init__( |
| 1769 | zorder=zorder, |
| 1770 | **kwargs) |
| 1771 | self.set_segments(segments) |
| 1772 | |
| 1773 | def set_segments(self, segments): |
| 1774 | if segments is None: |
nothing calls this directly
no test coverage detected