+ f.write("call \'%s/graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode))
+
+ # Setting up the compare files that will be plot later
+ compare=open(gnuplot_output_dir + 'compare.gnuplot','w')
+ compare.write('''
+set title '%s'
+set terminal png size 1280,1024
+set ytics axis out auto
+set key top left reverse
+set xlabel "Time (Seconds)"
+set ylabel '%s'
+set xrange [0:]
+set yrange [0:]
+'''% (title,mode))
+ compare.close()
+ #Copying the common file for all kind of graph (raw/smooth/trend)
+ compare_raw_filename="compare-%s-2Draw" % (gnuplot_output_filename)
+ compare_smooth_filename="compare-%s-2Dsmooth" % (gnuplot_output_filename)
+ compare_trend_filename="compare-%s-2Dtrend" % (gnuplot_output_filename)
+ shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_raw_filename+".gnuplot")
+ shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_smooth_filename+".gnuplot")
+ shutil.copy(gnuplot_output_dir+'compare.gnuplot',gnuplot_output_dir+compare_trend_filename+".gnuplot")
+
+ #Setting up a different output filename for each kind of graph
+ compare_raw=open(gnuplot_output_dir+compare_raw_filename + ".gnuplot",'a')
+ compare_raw.write("set output '%s.png'\n" % compare_raw_filename)
+ compare_smooth=open(gnuplot_output_dir+compare_smooth_filename+".gnuplot",'a')
+ compare_smooth.write("set output '%s.png'\n" % compare_smooth_filename)
+ compare_trend=open(gnuplot_output_dir+compare_trend_filename+".gnuplot",'a')
+ compare_trend.write("set output '%s.png'\n" % compare_trend_filename)