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

Method __init__

site-packages/matplotlib/offsetbox.py:472–499  ·  view source on GitHub ↗

*pad* : boundary pad .. note:: *pad* need to given in points and will be scale with the renderer dpi, while *width* and *height* need to be in pixels.

(self, child, pad=None, draw_frame=False, patch_attrs=None)

Source from the content-addressed store, hash-verified

470
471class PaddedBox(OffsetBox):
472 def __init__(self, child, pad=None, draw_frame=False, patch_attrs=None):
473 """
474 *pad* : boundary pad
475
476 .. note::
477 *pad* need to given in points and will be
478 scale with the renderer dpi, while *width* and *height*
479 need to be in pixels.
480 """
481
482 super().__init__()
483
484 self.pad = pad
485 self._children = [child]
486
487 self.patch = FancyBboxPatch(
488 xy=(0.0, 0.0), width=1., height=1.,
489 facecolor='w', edgecolor='k',
490 mutation_scale=1, # self.prop.get_size_in_points(),
491 snap=True
492 )
493
494 self.patch.set_boxstyle("square", pad=0)
495
496 if patch_attrs is not None:
497 self.patch.update(patch_attrs)
498
499 self._drawFrame = draw_frame
500
501 def get_extent_offsets(self, renderer):
502 """

Callers

nothing calls this directly

Calls 4

FancyBboxPatchClass · 0.90
set_boxstyleMethod · 0.80
__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected