Returns ------- list List of segments in the LineCollection. Each list item contains an array of vertices.
(self)
| 1783 | set_paths = set_segments |
| 1784 | |
| 1785 | def get_segments(self): |
| 1786 | """ |
| 1787 | Returns |
| 1788 | ------- |
| 1789 | list |
| 1790 | List of segments in the LineCollection. Each list item contains an |
| 1791 | array of vertices. |
| 1792 | """ |
| 1793 | segments = [] |
| 1794 | |
| 1795 | for path in self._paths: |
| 1796 | vertices = [ |
| 1797 | vertex |
| 1798 | for vertex, _ |
| 1799 | # Never simplify here, we want to get the data-space values |
| 1800 | # back and there in no way to know the "right" simplification |
| 1801 | # threshold so never try. |
| 1802 | in path.iter_segments(simplify=False) |
| 1803 | ] |
| 1804 | vertices = np.asarray(vertices) |
| 1805 | segments.append(vertices) |
| 1806 | |
| 1807 | return segments |
| 1808 | |
| 1809 | def _get_default_linewidth(self): |
| 1810 | return mpl.rcParams['lines.linewidth'] |