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 1313
1414import numpy as np
1515
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
2018from matplotlib .figure import Figure
2119
2220
@@ -44,10 +42,9 @@ def on_activate(app):
4442 toolbar = NavigationToolbar (canvas )
4543 vbox .append (toolbar )
4644
47- win .show ()
45+ win .present ()
4846
4947
50- app = Gtk .Application (
51- application_id = 'org.matplotlib.examples.EmbeddingInGTK4PanZoom' )
48+ app = Gtk .Application (application_id = 'org.matplotlib.examples.EmbeddingInGTK4PanZoom' )
5249app .connect ('activate' , on_activate )
5350app .run (None )
Original file line number Diff line number Diff line change 1414
1515import numpy as np
1616
17- from matplotlib .backends .backend_gtk4agg import \
18- FigureCanvasGTK4Agg as FigureCanvas
17+ from matplotlib .backends .backend_gtk4agg import FigureCanvasGTK4Agg as FigureCanvas
1918from matplotlib .figure import Figure
2019
2120
@@ -39,7 +38,7 @@ def on_activate(app):
3938 canvas .set_size_request (800 , 600 )
4039 sw .set_child (canvas )
4140
42- win .show ()
41+ win .present ()
4342
4443
4544app = Gtk .Application (application_id = 'org.matplotlib.examples.EmbeddingInGTK4' )
You can’t perform that action at this time.
0 commit comments