diff options
author | Björn B. Brandenburg <bbb@cs.unc.edu> | 2010-05-25 14:57:34 -0400 |
---|---|---|
committer | Björn B. Brandenburg <bbb@cs.unc.edu> | 2010-05-25 14:57:34 -0400 |
commit | 8690d0c48131d7d6338aee1f701ab8a1acaf9474 (patch) | |
tree | b183ac2fd298c26616c68ef9cf29ed6b7492ea60 /gnuplot.py | |
parent | 1cc581db8752d2bdf0a1ad6516b57fc506227b8b (diff) |
Support plot-wide default line style.
Diffstat (limited to 'gnuplot.py')
-rwxr-xr-x | gnuplot.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -121,6 +121,8 @@ class Plot(object): | |||
121 | self.labels = [] | 121 | self.labels = [] |
122 | self.curves = [] | 122 | self.curves = [] |
123 | 123 | ||
124 | self.default_style = None # for plotted curves | ||
125 | |||
124 | def gnuplot_commands(self, cmd_buf=None): | 126 | def gnuplot_commands(self, cmd_buf=None): |
125 | if cmd_buf: | 127 | if cmd_buf: |
126 | g = cmd_buf | 128 | g = cmd_buf |
@@ -192,7 +194,7 @@ class Plot(object): | |||
192 | if logscale: | 194 | if logscale: |
193 | g("set logscale %s" % logscale) | 195 | g("set logscale %s" % logscale) |
194 | 196 | ||
195 | plots = [c.gnuplot_cmd() for c in self.curves] | 197 | plots = [c.gnuplot_cmd(self.default_style) for c in self.curves] |
196 | if plots: | 198 | if plots: |
197 | g("plot " + ", ".join(plots)) | 199 | g("plot " + ", ".join(plots)) |
198 | 200 | ||