code: import tkinter as tk
  import matplotlib.pyplot as plt
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
  
  data = {
              'Basquet': 11,
              'Futbol': 222,
              'Natacion': 121,
              'Esqui': 321,
              'Tenis': 44
          }
  clave = data.keys()
  valor = data.values()
  
  ventana= tk.Tk() 
    
  figura = plt.Figure(figsize=(6,5), dpi=100)
  lienzo_figura = FigureCanvasTkAgg(figura, ventana)
  lienzo_figura.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH)
  
  ax1 = figura.add_subplot()
  ax1.set_title('Alumnos')
  ax1.plot(clave, valor)
  ax1.set_ylabel('Cantidad alumnos')
  ax1.set_xlabel('Materias')
  
  toolbar =NavigationToolbar2Tk(lienzo_figura, ventana)
  toolbar.update()
  toolbar.pack(side=tk.BOTTOM, fill=tk.Y)
  ventana.mainloop() import tkinter as tk
  import matplotlib.pyplot as plt
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
  
  data = {
              '0-9': 5000,
              '10-19': 2000,
              '20-29': 30000,
              '30-39': 43490,
              '40-49': 39898
          }
  clave = data.keys()
  valor = data.values()
  
  ventana= tk.Tk() 
    
  figura = plt.Figure(figsize=(6,5), dpi=100)
  lienzo_figura = FigureCanvasTkAgg(figura, ventana)
  lienzo_figura.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH)
  
  ax1 = figura.add_subplot()
  ax1.set_title('Habitantes')
  ax1.barh(list(clave), list(valor))
  ax1.set_ylabel('Rango de edad')
  ax1.set_xlabel('Cantidad')
  
  toolbar =NavigationToolbar2Tk(lienzo_figura, ventana)
  toolbar.update()
  toolbar.pack(side=tk.BOTTOM, fill=tk.Y)
  ventana.mainloop()
apis: matplotlib.backends.backend_tkagg.FigureCanvasTkAgg matplotlib.backends.backend_tkagg.NavigationToolbar2Tk matplotlib.pyplot.Figure
apis: matplotlib.backends.backend_tkagg.FigureCanvasTkAgg matplotlib.backends.backend_tkagg.NavigationToolbar2Tk matplotlib.pyplot.Figure