title: Implement python ttk.notebook with graph
body: <p>I have a tkinter GUI python ver 2.7. The code is: </p>
  
  <pre><code>Main = Tk()
  Main.tk_setPalette(background='white')
  Time(Main)
  init()
  GenerateMenus(Main)
  w = GenerateDisplay(Main)
  n = ttk.Notebook(Main, width= 800, height =400)
  n.grid(row=6,column=0, columnspan=9)
  f1 = ttk.Frame(n);
  f2 = ttk.Frame(n);
  n.add(f2, text='Two')
  n.add(f1, text='One')
  GenerateGraph(f1)
  </code></pre>
  
  <p>Code for Generating Graph</p>
  
  <pre><code>import matplotlib
  matplotlib.use("TkAgg")
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
  from matplotlib.figure import Figure
  import matplotlib.animation as animation
  from matplotlib import *
  from random import *
  import Tkinter as tk
  
  f = Figure(figsize=(5.5,3.5), dpi=120)
  rc("font", size = 7)
  Figure
  a = f.add_subplot(111)
  xList = []
  yList = []
  x= 0
  y = 0
  
  def animate(i):
      global x
      global y
      xList.append(int(x))
      yList.append(int(y))
  
      y = randint(0,100)
      x += 5
  
      a.clear()
      a.plot(xList, yList)
      a.set_ylim(0,100)
      a.set_xlabel("Time (s)")
      a.set_ylabel("Acceleration (m/s2)")
  
  
  def GenerateGraph(Master):
      dataPlot = FigureCanvasTkAgg(f, master=Master)
      dataPlot.show()
      dataPlot.get_tk_widget().grid(row=0, column=0)
  
      toolbar = NavigationToolbar2TkAgg(dataPlot, Master)
      toolbar.update()
      dataPlot._tkcanvas.grid(row=1, column=0)
  </code></pre>
  
  <p>The rest of the GUI is displayed but the graph is not. I am new to tkinter and would like to know how to edit this code so that the graph shows inside a notebook tab.</p>