diff options
-rwxr-xr-x | gnuplot.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -40,14 +40,14 @@ class Label(object): | |||
40 | 40 | ||
41 | class FileGraph(object): | 41 | class FileGraph(object): |
42 | def __init__(self, fname, xcol=1, ycol=2, error=None, | 42 | def __init__(self, fname, xcol=1, ycol=2, error=None, |
43 | title=None, | 43 | title=None, style=None, smooth=None): |
44 | style=None): | ||
45 | self.fname = fname | 44 | self.fname = fname |
46 | self.xcol = xcol | 45 | self.xcol = xcol |
47 | self.ycol = ycol | 46 | self.ycol = ycol |
48 | self.error = error | 47 | self.error = error |
49 | self.title = title | 48 | self.title = title |
50 | self.style = style # replace with linetype, lines/points etc. | 49 | self.style = style # replace with linetype, lines/points etc. |
50 | self.smooth = smooth | ||
51 | 51 | ||
52 | def __str__(self): | 52 | def __str__(self): |
53 | return self.gnuplot_cmd() | 53 | return self.gnuplot_cmd() |
@@ -61,8 +61,9 @@ class FileGraph(object): | |||
61 | style = self.style if self.style else default_style | 61 | style = self.style if self.style else default_style |
62 | style_txt = " with %s" % style if style else "" | 62 | style_txt = " with %s" % style if style else "" |
63 | title_txt = ' title "%s"' % self.title if self.title else "" | 63 | title_txt = ' title "%s"' % self.title if self.title else "" |
64 | return "'%s' using %s%s%s" % \ | 64 | smooth_txt = ' smooth %s' % self.smooth if self.smooth else "" |
65 | (self.fname, using_txt, title_txt, style_txt) | 65 | return "'%s' using %s%s%s%s" % \ |
66 | (self.fname, using_txt, title_txt, style_txt, smooth_txt) | ||
66 | 67 | ||
67 | 68 | ||
68 | class LiteralGraph(object): | 69 | class LiteralGraph(object): |