diff --git a/src/logplot/logging_plotting.py b/src/logplot/logging_plotting.py index f707b416..c7c2c50c 100644 --- a/src/logplot/logging_plotting.py +++ b/src/logplot/logging_plotting.py @@ -256,7 +256,7 @@ def save_plot(self,plot_name,**kwargs): # TO DO - need to be sure of safe file names if not os.path.isdir(self.plot_path): os.makedirs(self.plot_path) - filename = self.plot_path + "/" + string.replace(plot_name, " ", "_") + ".pdf" + filename = self.plot_path + "/" + plot_name.replace(" ", "_") + ".pdf" logger.info('Generating a plot in file %s' % filename) self.plots[plot_name].generate_plot(filename,**kwargs) # else: