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

Method _create_closed

lib/matplotlib/path.py:191–199  ·  view source on GitHub ↗

Create a closed polygonal path going through *vertices*. Unlike ``Path(..., closed=True)``, *vertices* should **not** end with an entry for the CLOSEPATH; this entry is added by `._create_closed`.

(cls, vertices)

Source from the content-addressed store, hash-verified

189
190 @classmethod
191 def _create_closed(cls, vertices):
192 """
193 Create a closed polygonal path going through *vertices*.
194
195 Unlike ``Path(..., closed=True)``, *vertices* should **not** end with
196 an entry for the CLOSEPATH; this entry is added by `._create_closed`.
197 """
198 v = _to_unmasked_float_array(vertices)
199 return cls(np.concatenate([v, v[:1]]), closed=True)
200
201 def _update_values(self):
202 self._simplify_threshold = mpl.rcParams['path.simplify_threshold']

Callers 12

get_pathMethod · 0.80
MarkerStyleClass · 0.80
ArrowClass · 0.80
__call__Method · 0.80
__call__Method · 0.80
__call__Method · 0.80
set_vertsMethod · 0.80
do_patchMethod · 0.80
test_point_in_pathFunction · 0.80
test_clipping_of_logFunction · 0.80

Calls 1

_to_unmasked_float_arrayFunction · 0.85

Tested by 3

test_point_in_pathFunction · 0.64
test_clipping_of_logFunction · 0.64