From 8a53287722d90631f08590e40c189fa89726eb72 Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Mon, 24 Oct 2011 17:47:13 -0400 Subject: added plots for Jim's PI meeting --- plot_rtas12_betaexp.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'plot_rtas12_betaexp.py') diff --git a/plot_rtas12_betaexp.py b/plot_rtas12_betaexp.py index 2153222..88be801 100755 --- a/plot_rtas12_betaexp.py +++ b/plot_rtas12_betaexp.py @@ -49,10 +49,15 @@ def set_plot_opts(opts, p): if opts.paper: ext = 'pdf' p.size = ('8.5cm', '5.25cm') + line_width = 1.5 + point_size = 0.3 p.font_size = '5pt' else: ext = 'png' p.size = (1024, 768) + line_width = 3.0 + point_size = 1.5 + p.font_size = 'font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" 18' p.output = '{0}.{1}'.format(p.output, ext) p.format = ext p.default_style = 'linespoints lw 2.5' @@ -61,15 +66,17 @@ def set_plot_opts(opts, p): p.ylog = True p.key = 'off' - p.line_styles = [(1, "lw 1.5 ps 0.4"), - (2, "lw 1.5 ps 0.4"), - (3, "lw 1.5 ps 0.4"), - (4, "lw 1.5 ps 0.4")] + p.line_styles = [ + (1, "lw {0} ps {1}".format(line_width, point_size)), + (2, "lw {0} ps {1}".format(line_width, point_size)), + (3, "lw {0} ps {1}".format(line_width, point_size)), + (4, "lw {0} ps {1}".format(line_width, point_size))] + for i, c in enumerate(p.curves): c.style = "linespoints ls %d" % (i + 1) -def plot_metric(opts, dat_dir, metric, coin_prob, xr=None): +def plot_metric(opts, dat_dir, metric, coin_prob, xr=None, for_jim=False): """Plot metric for each level, enforcement pair at the specified probability. @@ -79,7 +86,9 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None): p.output = '{0}/beta-exp-metric={1}-prob={2}'.format( dat_dir, metric, str(coin_prob).replace('.', '')) if xr is not None: - p.output = '{0}-zoom=1'.format(p.output) + p.output = '{0}_zoom=1'.format(p.output) + if for_jim: + p.output = '{0}-forjim=1'.format(p.output) for (level, enforcement) in [(l, e) for l in ('c', 'b') for e in (1, 0)]: fname = '{0}/beta_be={1}_prob={2}.csv'.format(dat_dir, enforcement, coin_prob) @@ -102,6 +111,12 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None): p.yrange = (-0.01, 1.01) if (metric == 'rel-rt-mean' and coin_prob == 0.1 and xr is None): p.key = 'at 1, 100' + + if for_jim: + p.title = 'relative response time mean, 10% abberant' + p.key = 'top left' + if xr is None: + p.key = 'at 1, 10' p.gnuplot_exec() def main(): @@ -122,5 +137,9 @@ def main(): # not in paper plot_metric(opts, data_dir, 'rel-rt-max', coin_val) + # for jim + plot_metric(opts, data_dir, 'rel-rt-mean', 0.1, for_jim=True) + plot_metric(opts, data_dir, 'rel-rt-mean', 0.1, xr=(0.02, 0.11), for_jim=True) + if __name__ == '__main__': main() -- cgit v1.2.2