MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / get_demo_image

Function get_demo_image

DemoPrograms/Demo_Matplotlib_Styles.py:34–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 plt.close('all')
33
34 def get_demo_image():
35 # prepare image
36 delta = 0.5
37
38 extent = (-3, 4, -4, 3)
39 x = np.arange(-3.0, 4.001, delta)
40 y = np.arange(-4.0, 3.001, delta)
41 X, Y = np.meshgrid(x, y)
42 Z1 = np.exp(-X ** 2 - Y ** 2)
43 Z2 = np.exp(-(X - 1) ** 2 - (Y - 1) ** 2)
44 Z = (Z1 - Z2) * 2
45
46 return Z, extent
47
48 def get_rgb():
49 Z, extent = get_demo_image()

Callers 1

get_rgbFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected