Histogram will always have a valid png now

This commit is contained in:
Neale Pickett 2009-10-09 10:28:57 -06:00
parent 6db2dd2edf
commit 7de6e179ec
1 changed files with 2 additions and 1 deletions

View File

@ -59,12 +59,13 @@ set xtics nomirror
set ytics nomirror set ytics nomirror
set nokey set nokey
set terminal png transparent size 640,200 x000000 xffffff set terminal png transparent size 640,200 x000000 xffffff
set output "%(pngout)s" set output "%(pngout)s,tmp"
plot %(plot)s\n''' % {'plot': ','.join(plotparts), plot %(plot)s\n''' % {'plot': ','.join(plotparts),
'pngout': pngout}) 'pngout': pngout})
instructions.flush() instructions.flush()
gp = os.system('gnuplot %s 2>/dev/null </dev/null' % instructions.name) gp = os.system('gnuplot %s 2>/dev/null </dev/null' % instructions.name)
os.rename("%s,tmp" % pngout, pngout)
if __name__ == '__main__': if __name__ == '__main__':
main() main()