title: Show different text with different figures clicking button
body: <p>This code currently show figures and texts all together in the canvas all at once. 
  I want to show the text "Figure Number: 1" with the first figure, "Figure Number: 2" with the second and similarly with the third as I press the buttons.
  This enables to show different information for different figures.
  I haven't been able to figure this out.
  How can I do this in the code? </p>
  
  <p>The code is executable.</p>
  
  <pre><code>import tkinter as tk
  import matplotlib.pyplot as plt
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
  
  all_figures1 = []
  selected_figure1 = 0 
  
  
  class MyClass1():
  
      def __init__(self):
  
          self.sheets = [[1,2,3], [3,1,2], [1,5,1]]
          self.W = 2
          self.L = 5
  
  
      def plot_sheet(self, data):
          """plot single figure"""
  
          fig, ax = plt.subplots(1)
  
          ax.set_xlim([0, self.W]) 
          ax.set_ylim([0, self.L])
  
          ax.plot(data)
  
          return fig
  
      def generate_all_figures(self):
          """create all figures and keep them on list"""
          global all_figures
  
          for data in self.sheets:
              fig = self.plot_sheet(data)
              all_figures1.append(fig)
  
  dataPlot1 = None  
  
  def on_window1():
  
      def show_figure(number):
          global dataPlot1
  
          current_num = str(number+1)
          total_num = str(len(all_figures1))
          counter = tk.Label(top, text = current_num + "/" + total_num)
          counter.grid(row=4,column=0)
  
          # remove old canvas
          if dataPlot1 is not None: # at start there is no canvas to destroy
              dataPlot1.get_tk_widget().destroy()
  
          # get figure from list
          one_figure = all_figures1[number]
  
          # display canvas with figuere
          dataPlot = FigureCanvasTkAgg(one_figure, master=top)
          dataPlot.draw()
          dataPlot.get_tk_widget().grid(row=0, column=0)
  
          toolbar_frame = tk.Frame(top)
          toolbar_frame.grid(row=1,column=0)
          toolbar = NavigationToolbar2Tk(dataPlot, toolbar_frame)
          toolbar.update()
  
      def on_prev():
          global selected_figure1
  
          # get number of previous figure
          selected_figure1 -= 1
          if selected_figure1 &lt; 0:
              selected_figure1 = len(all_figures1)-1
  
          show_figure(selected_figure1)
  
      def on_next():
          global selected_figure1
  
          # get number of next figure
          selected_figure1 += 1
          if selected_figure1 &gt; len(all_figures1)-1:
              selected_figure1 = 0
  
          show_figure(selected_figure1)
  
      top = tk.Toplevel()
      top.wm_geometry("794x470")
      top.title('Optimized Map 1')
  
      selected_figure1 = 0
      dataPlot = None # default value for `show_figure`
      show_figure(selected_figure1)
  
      frame = tk.Frame(top)
      frame.grid(row=3, column=0)
  
      canvas1 = tk.Canvas(top, width=400, height=280)
      canvas1.grid(row=0,column=200)
  
      for i in range(3):
          l3 = tk.Label(canvas1, text="Figure Number:" + str(i+1))
          canvas1.create_window(50,21*i, window=l3, anchor=tk.NW)
  
      myscrollbar= tk.Scrollbar(top,orient=tk.VERTICAL,command=canvas1.yview)
      myscrollbar.grid(row=0,column=200, sticky=tk.NS)
      canvas1.configure(yscrollcommand=myscrollbar.set)
      canvas1.bind_all('&lt;MouseWheel&gt;', lambda event: canvas1.yview_scroll(int(-1*(event.delta/120)), "units"))
      canvas1.configure(scrollregion=canvas1.bbox("all"))
  
  
      b1 = tk.Button(frame, text="&lt;&lt;", command=on_prev)
      b1.grid(row=2, column=0)
  
  
      b2 = tk.Button(frame, text="&gt;&gt;", command=on_next)
      b2.grid(row=2, column=1)
  
  window = tk.Tk()
  
  mc1 = MyClass1()
  mc1.generate_all_figures()
  
  b1 = tk.Button(window, text="Next", command=on_window1)
  b1.grid(row=0, column=0)
  
  window.mainloop()
  </code></pre>