aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2011-10-15 05:28:47 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2011-10-15 05:28:47 -0400
commit8ef8c63dda2f75b312a9b1a6194271de6cc8a449 (patch)
tree2386361b1e483a37f0b309625bcb689a671ad953
parent478e2b8c1a3fd0a44b52bcd0ec38fa4cb8fc2603 (diff)
key placement and pdf file name
-rwxr-xr-xplot_rtas12_betaexp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/plot_rtas12_betaexp.py b/plot_rtas12_betaexp.py
index dd26e85..11f29b3 100755
--- a/plot_rtas12_betaexp.py
+++ b/plot_rtas12_betaexp.py
@@ -69,14 +69,15 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None):
69 .""" 69 ."""
70 # each coin value gets a plot 70 # each coin value gets a plot
71 p = Plot() 71 p = Plot()
72 p.output = '{0}/beta-exp_metric={1}_prob={2}'.format(dat_dir, metric, coin_prob) 72 p.output = '{0}/beta-exp-metric={1}-prob={2}'.format(
73 dat_dir, metric, str(coin_prob).replace('.', ''))
73 if xr is not None: 74 if xr is not None:
74 p.output = '{0}_zoom=1'.format(p.output) 75 p.output = '{0}-zoom=1'.format(p.output)
75 p.output = '{0}.pdf'.format(p.output) 76 p.output = '{0}.pdf'.format(p.output)
76 77
77 p.format = 'pdf' 78 p.format = 'pdf'
78 79
79 for (level, enforcement) in [(l, e) for l in ('b', 'c') for e in (0, 1)]: 80 for (level, enforcement) in [(l, e) for l in ('c', 'b') for e in (1, 0)]:
80 fname = '{0}/beta_be={1}_prob={2}.csv'.format(dat_dir, enforcement, coin_prob) 81 fname = '{0}/beta_be={1}_prob={2}.csv'.format(dat_dir, enforcement, coin_prob)
81 ycol = g_col('{0}-{1}'.format(metric, level)) 82 ycol = g_col('{0}-{1}'.format(metric, level))
82 if enforcement == 1: 83 if enforcement == 1:
@@ -95,8 +96,8 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None):
95 if -1 != metric.find('ratio'): 96 if -1 != metric.find('ratio'):
96 p.ylog = False 97 p.ylog = False
97 p.yrange = (-0.01, 1.01) 98 p.yrange = (-0.01, 1.01)
98 if metric == 'miss-ratio' and coin_prob == 0.1: 99 if (metric == 'rel-rt-mean' and coin_prob == 0.1 and xr is None):
99 p.key = 'top right' 100 p.key = 'at 1, 100'
100 p.gnuplot_exec() 101 p.gnuplot_exec()
101 102
102def main(): 103def main():