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

Method make_image

lib/matplotlib/image.py:1386–1402  ·  view source on GitHub ↗
(self, renderer, magnification=1.0, unsampled=False)

Source from the content-addressed store, hash-verified

1384 -0.5 + self.oy, numrows-0.5 + self.oy)
1385
1386 def make_image(self, renderer, magnification=1.0, unsampled=False):
1387 # docstring inherited
1388 fig = self.get_figure(root=True)
1389 fac = renderer.dpi/fig.dpi
1390 # fac here is to account for pdf, eps, svg backends where
1391 # figure.dpi is set to 72. This means we need to scale the
1392 # image (using magnification) and offset it appropriately.
1393 bbox = Bbox([[self.ox/fac, self.oy/fac],
1394 [(self.ox/fac + self._A.shape[1]),
1395 (self.oy/fac + self._A.shape[0])]])
1396 width, height = fig.get_size_inches()
1397 width *= renderer.dpi
1398 height *= renderer.dpi
1399 clip = Bbox([[0, 0], [width, height]])
1400 return self._make_image(
1401 self._A, bbox, bbox, clip, magnification=magnification / fac,
1402 unsampled=unsampled, round_to_pixel_border=False)
1403
1404 def set_data(self, A):
1405 """Set the image array."""

Callers

nothing calls this directly

Calls 4

BboxClass · 0.90
get_size_inchesMethod · 0.80
_make_imageMethod · 0.80
get_figureMethod · 0.45

Tested by

no test coverage detected