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

Method __init__

galleries/examples/misc/demo_ribbon_box.py:30–33  ·  view source on GitHub ↗
(self, color)

Source from the content-addressed store, hash-verified

28 nx = original_image.shape[1]
29
30 def __init__(self, color):
31 rgb = mcolors.to_rgb(color)
32 self.im = np.dstack(
33 [self.b_and_h - self.color * (1 - np.array(rgb)), self.alpha])
34
35 def get_stretched_image(self, stretch_factor):
36 stretch_factor = max(stretch_factor, 1)

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected