From 68a8a52a44372869404ee0950ddb2c209b25a155 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 10 Apr 2011 13:41:32 -0400 Subject: Use custom linestyles for ECRTS11 experiments. --- gnuplot.py | 4 ++++ plot.py | 32 +++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/gnuplot.py b/gnuplot.py index b0db2c9..ca1e2ff 100755 --- a/gnuplot.py +++ b/gnuplot.py @@ -123,6 +123,7 @@ class Plot(object): self.curves = [] self.default_style = None # for plotted curves + self.line_styles = [] def gnuplot_commands(self, cmd_buf=None): if cmd_buf: @@ -195,6 +196,9 @@ class Plot(object): if logscale: g("set logscale %s" % logscale) + for ls in self.line_styles: + g("set style line %d %s" % (ls[0], ls[1])) + plots = [c.gnuplot_cmd(self.default_style) for c in self.curves] if plots: g("plot " + ", ".join(plots)) diff --git a/plot.py b/plot.py index c618b1c..ba67ff2 100755 --- a/plot.py +++ b/plot.py @@ -541,12 +541,12 @@ class SchedPlotter(defapp.App): npsf_comp = [ ('NPS-F (idle, delta=1)', 9), - ('NPS-F (idle, delta=4)', 10), - ('NPS-F (load, delta=1)', 7), ('C-NPS-F (idle, delta=1)', 13), + ('NPS-F (idle, delta=4)', 10), ('C-NPS-F (idle, delta=4)', 14), - ('NPS-F (load, delta=4)', 8), + ('NPS-F (load, delta=1)', 7), ('C-NPS-F (load, delta=1)', 11), + ('NPS-F (load, delta=4)', 8), ('C-NPS-F (load, delta=4)', 12), ] @@ -611,17 +611,32 @@ class SchedPlotter(defapp.App): return p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) - for (t, idx) in titles] + for (i, (t, idx)) in enumerate(titles)] p.yrange = (-0.05, 1.05) p.yticks = (0, 0.1) #### Styling. + if not self.setup_png(p): p.rounded_caps = True p.font = 'Helvetica' + if self.options.paper or self.options.appendix: + for i, c in enumerate(p.curves): + c.style = "linespoints ls %d" % (i + 1) + + p.line_styles = [ + (1, "lw 2.5"), + (2, "lw 2.5"), + (3, "lw 2.5"), + (4, "lw 2.5"), + (5, 'lw 2.5 lc rgbcolor "#ff910d"'), + (6, "lw 2.5"), + (7, 'lw 2.5 lc rgbcolor "#000000"'), + (8, "lw 2.5"), + ] if self.options.paper: p.default_style = 'lines lw 2.5' @@ -630,11 +645,10 @@ class SchedPlotter(defapp.App): p.monochrome = False p.dashed_lines = False if not self.options.alternate: - p.key ='below' - p.size = ('14.5cm', '4cm') - p.yticks = (0, 0.2) - -# p.key = 'below' + p.key ='off' + p.size = ('8.5cm', '5.5cm') + p.yticks = (0, 0.1) + p.key = 'below' p.default_style = 'linespoints lw 2.5' elif self.options.slides: p.dashed_lines = False -- cgit v1.2.2