MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / __init__

Method __init__

site-packages/matplotlib/legend.py:331–575  ·  view source on GitHub ↗

Parameters ---------- parent : `~matplotlib.axes.Axes` or `.Figure` The artist that contains the legend. handles : sequence of `.Artist` A list of Artists (lines, patches) to be added to the legend. labels : sequence of strings

(self, parent, handles, labels,
                 loc=None,
                 numpoints=None,    # the number of points in the legend line
                 markerscale=None,  # the relative size of legend markers
                                    # vs. original
                 markerfirst=True,  # controls ordering (left-to-right) of
                                    # legend marker and label
                 scatterpoints=None,    # number of scatter points
                 scatteryoffsets=None,
                 prop=None,          # properties for the legend texts
                 fontsize=None,        # keyword to set font size directly

                 # spacing & pad defined as a fraction of the font-size
                 borderpad=None,      # the whitespace inside the legend border
                 labelspacing=None,   # the vertical space between the legend
                                      # entries
                 handlelength=None,   # the length of the legend handles
                 handleheight=None,   # the height of the legend handles
                 handletextpad=None,  # the pad between the legend handle
                                      # and text
                 borderaxespad=None,  # the pad between the axes and legend
                                      # border
                 columnspacing=None,  # spacing between columns

                 ncol=1,     # number of columns
                 mode=None,  # mode for horizontal distribution of columns.
                             # None, "expand"

                 fancybox=None,  # True use a fancy box, false use a rounded
                                 # box, none use rc
                 shadow=None,
                 title=None,  # set a title for the legend
                 title_fontsize=None,  # set to ax.fontsize if None
                 framealpha=None,  # set frame alpha
                 edgecolor=None,  # frame patch edgecolor
                 facecolor=None,  # frame patch facecolor

                 bbox_to_anchor=None,  # bbox that the legend will be anchored.
                 bbox_transform=None,  # transform for the bbox
                 frameon=None,  # draw frame
                 handler_map=None,
                 )

Source from the content-addressed store, hash-verified

329
330 @docstring.dedent_interpd
331 def __init__(self, parent, handles, labels,
332 loc=None,
333 numpoints=None, # the number of points in the legend line
334 markerscale=None, # the relative size of legend markers
335 # vs. original
336 markerfirst=True, # controls ordering (left-to-right) of
337 # legend marker and label
338 scatterpoints=None, # number of scatter points
339 scatteryoffsets=None,
340 prop=None, # properties for the legend texts
341 fontsize=None, # keyword to set font size directly
342
343 # spacing & pad defined as a fraction of the font-size
344 borderpad=None, # the whitespace inside the legend border
345 labelspacing=None, # the vertical space between the legend
346 # entries
347 handlelength=None, # the length of the legend handles
348 handleheight=None, # the height of the legend handles
349 handletextpad=None, # the pad between the legend handle
350 # and text
351 borderaxespad=None, # the pad between the axes and legend
352 # border
353 columnspacing=None, # spacing between columns
354
355 ncol=1, # number of columns
356 mode=None, # mode for horizontal distribution of columns.
357 # None, "expand"
358
359 fancybox=None, # True use a fancy box, false use a rounded
360 # box, none use rc
361 shadow=None,
362 title=None, # set a title for the legend
363 title_fontsize=None, # set to ax.fontsize if None
364 framealpha=None, # set frame alpha
365 edgecolor=None, # frame patch edgecolor
366 facecolor=None, # frame patch facecolor
367
368 bbox_to_anchor=None, # bbox that the legend will be anchored.
369 bbox_transform=None, # transform for the bbox
370 frameon=None, # draw frame
371 handler_map=None,
372 ):
373 """
374 Parameters
375 ----------
376 parent : `~matplotlib.axes.Axes` or `.Figure`
377 The artist that contains the legend.
378
379 handles : sequence of `.Artist`
380 A list of Artists (lines, patches) to be added to the legend.
381
382 labels : sequence of strings
383 A list of labels to show next to the artists. The length of handles
384 and labels should be the same. If they are not, they are truncated
385 to the smaller of both lengths.
386
387 Other Parameters
388 ----------------

Callers 1

__init__Method · 0.45

Calls 15

set_bbox_to_anchorMethod · 0.95
_set_artist_propsMethod · 0.95
_init_legend_boxMethod · 0.95
get_frameMethod · 0.95
set_titleMethod · 0.95
FontPropertiesClass · 0.90
FancyBboxPatchClass · 0.90
get_size_in_pointsMethod · 0.80
startswithMethod · 0.80
set_boxstyleMethod · 0.80
set_sizeMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected