code: def plot_grid_to_ax(self, ax, **kwargs):
          
          all_xz = []
          for x, z in zip(self.grid['x'], self.grid['z']):
              tmp = np.vstack((x, z)).T
              all_xz.append(tmp)
          collection = mpl.collections.PolyCollection(
              all_xz,
              edgecolor='k',
              facecolor='none',
              linewidth=0.4,
          )
          ax.add_collection(collection)
          if self.electrodes is not None:
              ax.scatter(
                  self.electrodes[:, 1],
                  self.electrodes[:, 2],
                  color=self.props['electrode_color'],
                  clip_on=False,
              )
          ax.set_xlim(self.grid['x'].min(), self.grid['x'].max())
          ax.set_ylim(self.grid['z'].min(), self.grid['z'].max())
          # ax.autoscale_view()
          ax.set_aspect('equal')
  
          if kwargs.get('plot_electrode_numbers', False):
              for nr, xy in enumerate(self.electrodes[:, 1:3]):
                  ax.text(
                      xy[0], xy[1],
                      format(nr + 1),
                      bbox=dict(boxstyle='circle', facecolor='red', alpha=0.8)
                  )
docs: Other Parameters
          ---------------
          plot_electrode_numbers: bool, optional
              Plot electrode numbers in the grid, default: False