code: def clear(self):
      # docstring inherited
  
      # Init gridlines before clear() as clear() calls grid().
      self.gridlines = gridlines = GridlinesCollection(
          [],
          colors=mpl.rcParams["grid.color"],
          linestyles=mpl.rcParams["grid.linestyle"],
          linewidths=mpl.rcParams["grid.linewidth"],
      )
      self._set_artist_props(gridlines)
      gridlines.set_grid_helper(self.get_grid_helper())
  
      super().clear()
  
      # clip_path is set after Axes.clear(): that's when a patch is created.
      gridlines.set_clip_path(self.axes.patch)
  
      # Init axis artists.
      self._axislines = mpl_axes.Axes.AxisDict(self)
      new_fixed_axis = self.get_grid_helper().new_fixed_axis
      self._axislines.update(
          {
              loc: new_fixed_axis(
                  loc=loc, axes=self, axis_direction=loc
              )
              for loc in ["bottom", "top", "left", "right"]
          }
      )
      for axisline in [
          self._axislines["top"],
          self._axislines["right"],
      ]:
          axisline.label.set_visible(False)
          axisline.major_ticklabels.set_visible(False)
          axisline.minor_ticklabels.set_visible(False)
  
imports: import numpy
  import matplotlib
  from matplotlib import _api
  import matplotlib.axes
  from matplotlib.path import Path
  from mpl_toolkits.axes_grid1 import mpl_axes
  from .axisline_style import AxislineStyle
  from .axis_artist import AxisArtist, GridlinesCollection
label_desc: Use image node_id 5 for calling the Axes obj's underlying member method code with example usage: obj.clear() without return types