Skip to content

Commit

Permalink
Merge pull request #3359 from MartinThoma/master
Browse files Browse the repository at this point in the history
PEP8 conformity; removed outcommented code
  • Loading branch information
efiring committed Aug 11, 2014
2 parents 0b73eda + 34737d9 commit 17adaa2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions examples/user_interfaces/embedding_in_tk2.py
Expand Up @@ -3,7 +3,7 @@
matplotlib.use('TkAgg')

from numpy import arange, sin, pi
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure

import sys
Expand All @@ -12,19 +12,20 @@
else:
import tkinter as Tk

def destroy(e): sys.exit()

def destroy(e):
sys.exit()

root = Tk.Tk()
root.wm_title("Embedding in TK")
#root.bind("<Destroy>", destroy)


f = Figure(figsize=(5,4), dpi=100)
f = Figure(figsize=(5, 4), dpi=100)
a = f.add_subplot(111)
t = arange(0.0,3.0,0.01)
t = arange(0.0, 3.0, 0.01)
s = sin(2*pi*t)

a.plot(t,s)
a.plot(t, s)
a.set_title('Tk embedding')
a.set_xlabel('X axis label')
a.set_ylabel('Y label')
Expand All @@ -35,8 +36,6 @@ def destroy(e): sys.exit()
canvas.show()
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

#toolbar = NavigationToolbar2TkAgg( canvas, root )
#toolbar.update()
canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

button = Tk.Button(master=root, text='Quit', command=sys.exit)
Expand Down

0 comments on commit 17adaa2

Please sign in to comment.