aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-04-10 13:41:32 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-04-10 13:41:32 -0400
commit68a8a52a44372869404ee0950ddb2c209b25a155 (patch)
tree856439f1c8e2bb381e573dafa11e321e7e6c6a42
parentd7d9c89f404468dd9fe9c6eae70496fe60367ff2 (diff)
Use custom linestyles for ECRTS11 experiments.HEADmaster
-rwxr-xr-xgnuplot.py4
-rwxr-xr-xplot.py32
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):
123 self.curves = [] 123 self.curves = []
124 124
125 self.default_style = None # for plotted curves 125 self.default_style = None # for plotted curves
126 self.line_styles = []
126 127
127 def gnuplot_commands(self, cmd_buf=None): 128 def gnuplot_commands(self, cmd_buf=None):
128 if cmd_buf: 129 if cmd_buf:
@@ -195,6 +196,9 @@ class Plot(object):
195 if logscale: 196 if logscale:
196 g("set logscale %s" % logscale) 197 g("set logscale %s" % logscale)
197 198
199 for ls in self.line_styles:
200 g("set style line %d %s" % (ls[0], ls[1]))
201
198 plots = [c.gnuplot_cmd(self.default_style) for c in self.curves] 202 plots = [c.gnuplot_cmd(self.default_style) for c in self.curves]
199 if plots: 203 if plots:
200 g("plot " + ", ".join(plots)) 204 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):
541 541
542 npsf_comp = [ 542 npsf_comp = [
543 ('NPS-F (idle, delta=1)', 9), 543 ('NPS-F (idle, delta=1)', 9),
544 ('NPS-F (idle, delta=4)', 10),
545 ('NPS-F (load, delta=1)', 7),
546 ('C-NPS-F (idle, delta=1)', 13), 544 ('C-NPS-F (idle, delta=1)', 13),
545 ('NPS-F (idle, delta=4)', 10),
547 ('C-NPS-F (idle, delta=4)', 14), 546 ('C-NPS-F (idle, delta=4)', 14),
548 ('NPS-F (load, delta=4)', 8), 547 ('NPS-F (load, delta=1)', 7),
549 ('C-NPS-F (load, delta=1)', 11), 548 ('C-NPS-F (load, delta=1)', 11),
549 ('NPS-F (load, delta=4)', 8),
550 ('C-NPS-F (load, delta=4)', 12), 550 ('C-NPS-F (load, delta=4)', 12),
551 ] 551 ]
552 552
@@ -611,17 +611,32 @@ class SchedPlotter(defapp.App):
611 return 611 return
612 612
613 p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) 613 p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t)
614 for (t, idx) in titles] 614 for (i, (t, idx)) in enumerate(titles)]
615 615
616 p.yrange = (-0.05, 1.05) 616 p.yrange = (-0.05, 1.05)
617 p.yticks = (0, 0.1) 617 p.yticks = (0, 0.1)
618 618
619 #### Styling. 619 #### Styling.
620 620
621
621 if not self.setup_png(p): 622 if not self.setup_png(p):
622 p.rounded_caps = True 623 p.rounded_caps = True
623 p.font = 'Helvetica' 624 p.font = 'Helvetica'
624 625
626 if self.options.paper or self.options.appendix:
627 for i, c in enumerate(p.curves):
628 c.style = "linespoints ls %d" % (i + 1)
629
630 p.line_styles = [
631 (1, "lw 2.5"),
632 (2, "lw 2.5"),
633 (3, "lw 2.5"),
634 (4, "lw 2.5"),
635 (5, 'lw 2.5 lc rgbcolor "#ff910d"'),
636 (6, "lw 2.5"),
637 (7, 'lw 2.5 lc rgbcolor "#000000"'),
638 (8, "lw 2.5"),
639 ]
625 640
626 if self.options.paper: 641 if self.options.paper:
627 p.default_style = 'lines lw 2.5' 642 p.default_style = 'lines lw 2.5'
@@ -630,11 +645,10 @@ class SchedPlotter(defapp.App):
630 p.monochrome = False 645 p.monochrome = False
631 p.dashed_lines = False 646 p.dashed_lines = False
632 if not self.options.alternate: 647 if not self.options.alternate:
633 p.key ='below' 648 p.key ='off'
634 p.size = ('14.5cm', '4cm') 649 p.size = ('8.5cm', '5.5cm')
635 p.yticks = (0, 0.2) 650 p.yticks = (0, 0.1)
636 651 p.key = 'below'
637# p.key = 'below'
638 p.default_style = 'linespoints lw 2.5' 652 p.default_style = 'linespoints lw 2.5'
639 elif self.options.slides: 653 elif self.options.slides:
640 p.dashed_lines = False 654 p.dashed_lines = False