8000 SC · matplotlib/matplotlib@ceddb1f · GitHub
[go: up one dir, main page]

Skip to content

Commit ceddb1f

Browse files
author
Steve Chaplin
committed
SC
svn path=/trunk/matplotlib/; revision=1241
1 parent 8b01579 commit ceddb1f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

examples/embedding_in_gtk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python
2-
# show how to add a matplotlib FigureCanvasGTK widget to a gtk.Window
2+
"""
3+
show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget to a
4+
gtk.Window
5+
"""
36

47
from matplotlib.numerix import arange, sin, pi
58

examples/embedding_in_gtk2.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/usr/bin/env python
2-
# show how to add a matplotlib FigureCanvasGTK widget and a toolbar to a gtk.Window
2+
"""
3+
show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and
4+
a toolbar to a gtk.Window
5+
"""
36

47
from matplotlib.numerix import arange, sin, pi
58

69
import matplotlib
7-
matplotlib.use('GTKAgg') # or 'GTK'
10+
#matplotlib.use('GTK')
11+
matplotlib.use('GTKAgg')
812

913
# switch comments for gtk over gtkagg
10-
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
11-
#from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
14+
#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
15+
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
1216

1317
# or NavigationToolbar for classic
1418
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar

0 commit comments

Comments
 (0)
0