class_docstr: Widget to facilitate plotting
  
  Parameters
  ----------
  *args : arguments
      Arguments passed to the `ViewBox` super class.
  **kwargs : keywoard arguments
      Keyword arguments passed to the `ViewBox` super class.
  
  Notes
  -----
  This class is typically instantiated implicitly by a `Figure`
  instance, e.g., by doing ``fig[0, 0]``.
class_docstr_tok: ["Widget","to","facilitate","plotting","Parameters","--","--","--","--","--","*","args",":","arguments","Arguments","passed","to","the","`","ViewBox","`","super","class",".","*","*","kwargs",":","keywoard","arguments","Keyword","arguments","passed","to","the","`","ViewBox","`","super","class",".","Notes","--","--","-","This","class","is","typically","instantiated","implicitly","by","a","`","Figure","`","instance",",","e.g.",",","by","doing","``","fig","[","0",",","0","]","``","."]
code: def _configure_2d(self, fg_color=None):
      if self._configured:
          return
  
      if fg_color is None:
          fg = self._fg
      else:
          fg = fg_color
  
      #     c0        c1      c2      c3      c4      c5         c6
      #  r0 +---------+-------+-------+-------+-------+---------+---------+
      #     |         |                       | title |         |         |
      #  r1 |         +-----------------------+-------+---------+         |
      #     |         |                       | cbar  |         |         |
      #  r2 |         +-------+-------+-------+-------+---------+         |
      #     |         | cbar  | ylabel| yaxis |  view | cbar    | padding |
      #  r3 | padding +-------+-------+-------+-------+---------+         |
      #     |         |                       | xaxis |         |         |
      #  r4 |         +-----------------------+-------+---------+         |
      #     |         |                       | xlabel|         |         |
      #  r5 |         +-----------------------+-------+---------+         |
      #     |         |                       | cbar  |         |         |
      #  r6 |---------+-----------------------+-------+---------+---------|
      #     |                           padding                           |
      #     +---------+-----------------------+-------+---------+---------+
  
      # padding left
      padding_left = self.grid.add_widget(
          None, row=0, row_span=5, col=0
      )
      padding_left.width_min = 30
      padding_left.width_max = 60
  
      # padding right
      padding_right = self.grid.add_widget(
          None, row=0, row_span=5, col=6
      )
      padding_right.width_min = 30
      padding_right.width_max = 60
  
      # padding right
      padding_bottom = self.grid.add_widget(
          None, row=6, col=0, col_span=6
      )
      padding_bottom.height_min = 20
      padding_bottom.height_max = 40
  
      # row 0
      # title - column 4 to 5
      self.title_widget = self.grid.add_widget(self.title, row=0, col=4)
      self.title_widget.height_min = self.title_widget.height_max = 40
  
      # row 1
      # colorbar - column 4 to 5
      self.cbar_top = self.grid.add_widget(None, row=1, col=4)
      self.cbar_top.height_max = 1
  
      # row 2
      # colorbar_left - column 1
      # ylabel - column 2
      # yaxis - column 3
      # view - column 4
      # colorbar_right - column 5
      self.cbar_left = self.grid.add_widget(None, row=2, col=1)
      self.cbar_left.width_max = 1
  
      self.ylabel = scene.Label("", rotation=-90)
      ylabel_widget = self.grid.add_widget(self.ylabel, row=2, col=2)
      ylabel_widget.width_max = 1
  
      self.yaxis = scene.AxisWidget(
          orientation="left",
          text_color=fg,
          axis_color=fg,
          tick_color=fg,
      )
  
      yaxis_widget = self.grid.add_widget(self.yaxis, row=2, col=3)
      yaxis_widget.width_max = 40
  
      # row 3
      # xaxis - column 4
      self.xaxis = scene.AxisWidget(
          orientation="bottom",
          text_color=fg,
          axis_color=fg,
          tick_color=fg,
      )
      xaxis_widget = self.grid.add_widget(self.xaxis, row=3, col=4)
      xaxis_widget.height_max = 40
  
      self.cbar_right = self.grid.add_widget(None, row=2, col=5)
      self.cbar_right.width_max = 1
  
      # row 4
      # xlabel - column 4
      self.xlabel = scene.Label("")
      xlabel_widget = self.grid.add_widget(self.xlabel, row=4, col=4)
      xlabel_widget.height_max = 40
  
      # row 5
      self.cbar_bottom = self.grid.add_widget(None, row=5, col=4)
      self.cbar_bottom.height_max = 1
  
      # This needs to be added to the grid last (to fix #1742)
      self.view = self.grid.add_view(
          row=2, col=4, border_color="grey", bgcolor="#efefef"
      )
      self.view.camera = "panzoom"
      self.camera = self.view.camera
  
      self._configured = True
      self.xaxis.link_view(self.view)
      self.yaxis.link_view(self.view)
  
file_path: vispy/vispy/plot/plotwidget.py
imports: from ..None import scene
  from ..io import read_mesh
  from ..geometry import MeshData
label_desc: Use image node_id 2 for calling the PlotWidget obj's underlying member method code with example usage: obj._configure_2d(fg_color) without return types