code: def save_plot(self, filename, img_format="eps", **kwargs):
          
          plt = self.get_plot(**kwargs)
          plt.savefig(filename, format=img_format)
docs: Save matplotlib plot to a file.
  
          Args:
              filename: Filename to write to.
              img_format: Image format to use. Defaults to EPS.