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

Function main

galleries/examples/user_interfaces/mpl_with_glade3_sgskip.py:25–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def main():
26 builder = Gtk.Builder()
27 builder.add_objects_from_file(
28 str(Path(__file__).parent / "mpl_with_glade3.glade"),
29 ("window1", ""))
30 builder.connect_signals(Window1Signals())
31 window = builder.get_object("window1")
32 sw = builder.get_object("scrolledwindow1")
33
34 # Start of Matplotlib specific code
35 figure = Figure(figsize=(8, 6), dpi=71)
36 axis = figure.add_subplot()
37 t = np.arange(0.0, 3.0, 0.01)
38 s = np.sin(2*np.pi*t)
39 axis.plot(t, s)
40
41 axis.set_xlabel('time [s]')
42 axis.set_ylabel('voltage [V]')
43
44 canvas = FigureCanvas(figure) # a Gtk.DrawingArea
45 canvas.set_size_request(800, 600)
46 sw.add(canvas)
47 # End of Matplotlib specific code
48
49 window.show_all()
50 Gtk.main()
51
52if __name__ == "__main__":
53 main()

Callers 1

Calls 9

FigureClass · 0.90
PathClass · 0.85
Window1SignalsClass · 0.85
add_subplotMethod · 0.80
set_xlabelMethod · 0.80
set_ylabelMethod · 0.80
mainMethod · 0.80
plotMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…