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

Method _create_line

lib/matplotlib/legend_handler.py:372–383  ·  view source on GitHub ↗
(orig_handle, width, height)

Source from the content-addressed store, hash-verified

370
371 @staticmethod
372 def _create_line(orig_handle, width, height):
373 # Unfilled StepPatch should show as a line
374 legline = Line2D([0, width], [height/2, height/2],
375 color=orig_handle.get_edgecolor(),
376 linestyle=orig_handle.get_linestyle(),
377 linewidth=orig_handle.get_linewidth(),
378 )
379
380 # Overwrite manually because patch and line properties don't mix
381 legline.set_drawstyle('default')
382 legline.set_marker("")
383 return legline
384
385 def create_artists(self, legend, orig_handle,
386 xdescent, ydescent, width, height, fontsize, trans):

Callers 1

create_artistsMethod · 0.95

Calls 6

set_drawstyleMethod · 0.95
set_markerMethod · 0.95
Line2DClass · 0.90
get_edgecolorMethod · 0.45
get_linestyleMethod · 0.45
get_linewidthMethod · 0.45

Tested by

no test coverage detected