code: def update_frequency(new_val):
      # retrieve frequency
      f = float(new_val)
  
      # update data
      y = 2 * np.sin(2 * np.pi * f * t)
      line.set_data(t, y)
  
      # required to update canvas and attached toolbar!
      canvas.draw()
  
imports: import tkinter
  import numpy
  from matplotlib.backend_bases import key_press_handler
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
  from matplotlib.figure import Figure
label_desc: Use image node_id 1 for calling a global function with example usage: update_frequency(new_val) without return types