MCPcopy Index your code
hub / github.com/plotly/plotly.py / draw_patch

Method draw_patch

plotly/matplotlylib/mplexporter/exporter.py:234–248  ·  view source on GitHub ↗

Process a matplotlib patch object and call renderer.draw_path

(self, ax, patch, force_trans=None)

Source from the content-addressed store, hash-verified

232 )
233
234 def draw_patch(self, ax, patch, force_trans=None):
235 """Process a matplotlib patch object and call renderer.draw_path"""
236 vertices, pathcodes = utils.SVG_path(patch.get_path())
237 transform = patch.get_transform()
238 coordinates, vertices = self.process_transform(
239 transform, ax, vertices, force_trans=force_trans
240 )
241 linestyle = utils.get_path_style(patch, fill=patch.get_fill())
242 self.renderer.draw_path(
243 data=vertices,
244 coordinates=coordinates,
245 pathcodes=pathcodes,
246 style=linestyle,
247 mplobj=patch,
248 )
249
250 def draw_collection(
251 self, ax, collection, force_pathtrans=None, force_offsettrans=None

Callers 2

crawl_axMethod · 0.95
crawl_legendMethod · 0.95

Calls 2

process_transformMethod · 0.95
draw_pathMethod · 0.45

Tested by

no test coverage detected