code: def _finalize_axis(self, key):
          
          if 'title' in self.handles:
              self.handles['title'].set_visible(self.show_title)
  
          self.drawn = True
          if self.subplot:
              return self.handles['axis']
          else:
              fig = self.handles['fig']
              if not getattr(self, 'overlaid', False) and self._close_figures:
                  plt.close(fig)
              return fig
docs: General method to finalize the axis and plot.