MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_segments

Method get_segments

lib/matplotlib/collections.py:1785–1807  ·  view source on GitHub ↗

Returns ------- list List of segments in the LineCollection. Each list item contains an array of vertices.

(self)

Source from the content-addressed store, hash-verified

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']

Callers 9

test_get_segmentsFunction · 0.95
get_positionsMethod · 0.80
switch_orientationMethod · 0.80
set_linelengthMethod · 0.80
set_lineoffsetMethod · 0.80
bar_labelMethod · 0.80
check_segmentsFunction · 0.80
create_artistsMethod · 0.80

Calls 1

iter_segmentsMethod · 0.80

Tested by 3

test_get_segmentsFunction · 0.76
check_segmentsFunction · 0.64