From a43beaa10a61d2875b40596ee03d6ef9024fb22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Thu, 10 Jun 2010 21:15:41 -0400 Subject: Support smoothing of individual graphs. --- gnuplot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gnuplot.py') diff --git a/gnuplot.py b/gnuplot.py index 3a7b364..b0db2c9 100755 --- a/gnuplot.py +++ b/gnuplot.py @@ -40,14 +40,14 @@ class Label(object): class FileGraph(object): def __init__(self, fname, xcol=1, ycol=2, error=None, - title=None, - style=None): + title=None, style=None, smooth=None): self.fname = fname self.xcol = xcol self.ycol = ycol self.error = error self.title = title self.style = style # replace with linetype, lines/points etc. + self.smooth = smooth def __str__(self): return self.gnuplot_cmd() @@ -61,8 +61,9 @@ class FileGraph(object): style = self.style if self.style else default_style style_txt = " with %s" % style if style else "" title_txt = ' title "%s"' % self.title if self.title else "" - return "'%s' using %s%s%s" % \ - (self.fname, using_txt, title_txt, style_txt) + smooth_txt = ' smooth %s' % self.smooth if self.smooth else "" + return "'%s' using %s%s%s%s" % \ + (self.fname, using_txt, title_txt, style_txt, smooth_txt) class LiteralGraph(object): -- cgit v1.2.2