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

Method draw_markers

lib/matplotlib/backend_bases.py:179–208  ·  view source on GitHub ↗

Draw a marker at each of *path*'s vertices (excluding control points). The base (fallback) implementation makes multiple calls to `draw_path`. Backends may want to override this method in order to draw the marker only once and reuse it multiple times. Param

(self, gc, marker_path, marker_trans, path,
                     trans, rgbFace=None)

Source from the content-addressed store, hash-verified

177 raise NotImplementedError
178
179 def draw_markers(self, gc, marker_path, marker_trans, path,
180 trans, rgbFace=None):
181 """
182 Draw a marker at each of *path*'s vertices (excluding control points).
183
184 The base (fallback) implementation makes multiple calls to `draw_path`.
185 Backends may want to override this method in order to draw the marker
186 only once and reuse it multiple times.
187
188 Parameters
189 ----------
190 gc : `.GraphicsContextBase`
191 The graphics context.
192 marker_path : `~matplotlib.path.Path`
193 The path for the marker.
194 marker_trans : `~matplotlib.transforms.Transform`
195 An affine transform applied to the marker.
196 path : `~matplotlib.path.Path`
197 The locations to draw the markers.
198 trans : `~matplotlib.transforms.Transform`
199 An affine transform applied to the path.
200 rgbFace : :mpltype:`color`, optional
201 """
202 for vertices, codes in path.iter_segments(trans, simplify=False):
203 if len(vertices):
204 x, y = vertices[-2:]
205 self.draw_path(gc, marker_path,
206 marker_trans +
207 transforms.Affine2D().translate(x, y),
208 rgbFace)
209
210 def draw_path_collection(self, gc, master_transform, paths, all_transforms,
211 offsets, offset_trans, facecolors, edgecolors,

Callers 1

drawMethod · 0.45

Calls 3

draw_pathMethod · 0.95
iter_segmentsMethod · 0.80
translateMethod · 0.80

Tested by

no test coverage detected