code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      self.set_default_size(600, 600)
  
      self.set_title("GtkListStore demo")
  
      vbox = Gtk.Box(
          orientation=Gtk.Orientation.VERTICAL,
          homogeneous=False,
          spacing=8,
      )
      self.set_child(vbox)
  
      label = Gtk.Label(label="Double click a row to plot the data")
      vbox.append(label)
  
      sw = Gtk.ScrolledWindow()
      sw.set_has_frame(True)
      sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
      sw.set_hexpand(True)
      sw.set_vexpand(True)
      vbox.append(sw)
  
      model = self.create_model()
      self.treeview = Gtk.TreeView(model=model)
      self.treeview.connect("row-activated", self.plot_row)
      sw.set_child(self.treeview)
  
      # Matplotlib stuff
      fig = Figure(figsize=(6, 4), layout="constrained")
  
      self.canvas = FigureCanvas(fig)  # a Gtk.DrawingArea
      self.canvas.set_hexpand(True)
      self.canvas.set_vexpand(True)
      vbox.append(self.canvas)
      ax = fig.add_subplot()
      (self.line,) = ax.plot(
          self.data[0, :], "go"
      )  # plot the first row
  
      self.add_columns()
  
file_path: matplotlib/galleries/examples/user_interfaces/gtk4_spreadsheet_sgskip.py
imports: import gi
  from gi.repository import Gtk
  from numpy.random import random
  from matplotlib.backends.backend_gtk4agg 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()