<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_scan_plot(self, filename="scan.pdf", img_format="pdf", coords=None):
 """ Save matplotlib plot of the potential energy surface to a file. Args: filename: Filename to write to. img_format: Image format to use. Defaults to EPS. coords: internal coordinate name to use as abcissa. """

        plt = self.get_scan_plot(coords)
        plt.savefig(filename, format=img_format)