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

Method set_bounds

lib/matplotlib/patches.py:1019–1038  ·  view source on GitHub ↗

Set the bounds of the rectangle as *left*, *bottom*, *width*, *height*. The values may be passed as separate parameters or as a tuple:: set_bounds(left, bottom, width, height) set_bounds((left, bottom, width, height)) .. ACCEPTS: (left, bottom, wid

(self, *args)

Source from the content-addressed store, hash-verified

1017 self.stale = True
1018
1019 def set_bounds(self, *args):
1020 """
1021 Set the bounds of the rectangle as *left*, *bottom*, *width*, *height*.
1022
1023 The values may be passed as separate parameters or as a tuple::
1024
1025 set_bounds(left, bottom, width, height)
1026 set_bounds((left, bottom, width, height))
1027
1028 .. ACCEPTS: (left, bottom, width, height)
1029 """
1030 if len(args) == 1:
1031 l, b, w, h = args[0]
1032 else:
1033 l, b, w, h = args
1034 self._x0 = l
1035 self._y0 = b
1036 self._width = w
1037 self._height = h
1038 self.stale = True
1039
1040 def get_bbox(self):
1041 """Return the `.Bbox`."""

Callers 1

draw_boxFunction · 0.95

Calls

no outgoing calls

Tested by 1

draw_boxFunction · 0.76