File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
galleries/examples/user_interfaces Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 13
13
14
14
import numpy as np
15
15
16
- from matplotlib .backends .backend_gtk4 import \
17
- NavigationToolbar2GTK4 as NavigationToolbar
18
- from matplotlib .backends .backend_gtk4agg import \
19
- FigureCanvasGTK4Agg as FigureCanvas
16
+ from matplotlib .backends .backend_gtk4 import NavigationToolbar2GTK4 as NavigationToolbar
17
+ from matplotlib .backends .backend_gtk4agg import FigureCanvasGTK4Agg as FigureCanvas
20
18
from matplotlib .figure import Figure
21
19
22
20
@@ -44,10 +42,9 @@ def on_activate(app):
44
42
toolbar = NavigationToolbar (canvas )
45
43
vbox .append (toolbar )
46
44
47
- win .show ()
45
+ win .present ()
48
46
49
47
50
- app = Gtk .Application (
51
- application_id = 'org.matplotlib.examples.EmbeddingInGTK4PanZoom' )
48
+ app = Gtk .Application (application_id = 'org.matplotlib.examples.EmbeddingInGTK4PanZoom' )
52
49
app .connect ('activate' , on_activate )
53
50
app .run (None )
Original file line number Diff line number Diff line change 14
14
15
15
import numpy as np
16
16
17
- from matplotlib .backends .backend_gtk4agg import \
18
- FigureCanvasGTK4Agg as FigureCanvas
17
+ from matplotlib .backends .backend_gtk4agg import FigureCanvasGTK4Agg as FigureCanvas
19
18
from matplotlib .figure import Figure
20
19
21
20
@@ -39,7 +38,7 @@ def on_activate(app):
39
38
canvas .set_size_request (800 , 600 )
40
39
sw .set_child (canvas )
41
40
42
- win .show ()
41
+ win .present ()
43
42
44
43
45
44
app = Gtk .Application (application_id = 'org.matplotlib.examples.EmbeddingInGTK4' )
You can’t perform that action at this time.
0 commit comments