code: def __init__(self):
      super().__init__()
      self.set_default_size(600, 600)
      self.connect("destroy", lambda win: Gtk.main_quit())
  
      self.set_title("GtkListStore demo")
      self.set_border_width(8)
  
      vbox = Gtk.VBox(homogeneous=False, spacing=8)
      self.add(vbox)
  
      label = Gtk.Label(label="Double click a row to plot the data")
  
      vbox.pack_start(label, False, False, 0)
  
      sw = Gtk.ScrolledWindow()
      sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
      sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
      vbox.pack_start(sw, True, True, 0)
  
      model = self.create_model()
  
      self.treeview = Gtk.TreeView(model=model)
  
      # Matplotlib stuff
      fig = Figure(figsize=(6, 4))
  
      self.canvas = FigureCanvas(fig)  # a Gtk.DrawingArea
      vbox.pack_start(self.canvas, True, True, 0)
      ax = fig.add_subplot()
      (self.line,) = ax.plot(
          self.data[0, :], "go"
      )  # plot the first row
  
      self.treeview.connect("row-activated", self.plot_row)
      sw.add(self.treeview)
  
      self.add_columns()
  
      self.add_events(
          Gdk.EventMask.BUTTON_PRESS_MASK
          | Gdk.EventMask.KEY_PRESS_MASK
          | Gdk.EventMask.KEY_RELEASE_MASK
      )
  
file_path: matplotlib/galleries/examples/user_interfaces/gtk3_spreadsheet_sgskip.py
imports: import gi
  from gi.repository import Gdk, Gtk
  from numpy.random import random
  from matplotlib.backends.backend_gtk3agg import FigureCanvas
  from matplotlib.figure import Figure
label_desc: Use image node_id 1 to create a new DataManager object from inherited base classes: Gtk with example: obj = DataManager()