# HG changeset patch # User tomwalters # Date 1288575404 0 # Node ID 3cd89083089106e42e27d23a6a09170a6319b079 # Parent a06ab1d44e4316a110888d18112710c90cddc9ce - Offscreen plotting diff -r a06ab1d44e43 -r 3cd890830891 experiments/scripts/cnbh-syllables/results_plotting/plot_munged_results.py --- a/experiments/scripts/cnbh-syllables/results_plotting/plot_munged_results.py Mon Nov 01 01:29:33 2010 +0000 +++ b/experiments/scripts/cnbh-syllables/results_plotting/plot_munged_results.py Mon Nov 01 01:36:44 2010 +0000 @@ -6,8 +6,11 @@ import numpy as np import pylab as p +import matplotlib as mpl +mpl.use('PDF') import matplotlib.pyplot as plt + f=open("results_test_all.csv","r") results = dict() for line in f: @@ -23,7 +26,7 @@ snr = 50 else: snr = int(values[2]) - results[values[3]][values[0]][values[1]][int(values[4])][int(values[5])][int(vlues[6])][snr] = float(values[7]) + results[values[3]][values[0]][values[1]][int(values[4])][int(values[5])][int(values[6])][snr] = float(values[7]) # results[values[3]].append((values[1],values[2],values[2],values[4])) ax = plt.subplot(111) @@ -47,4 +50,4 @@ p.legend(lines, labels, 'upper left', shadow=True) p.xlabel('SNR/dB') p.ylabel('Recognition performance %') -plt.show() +plt.savefig(output_file)