aboutsummaryrefslogtreecommitdiffstats
path: root/plot/style.py
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-04-02 10:36:36 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2013-04-02 10:38:36 -0400
commit0d8c9ba50f48f3c2afb571a878117eb2aa50a969 (patch)
tree6bf6f37464180d85200f91a62f38903c74b30714 /plot/style.py
parent4b75d2b98036195b78d339210ab8d7512d9f2164 (diff)
Minor bug fixes from end-to-end testing.
Diffstat (limited to 'plot/style.py')
-rw-r--r--plot/style.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plot/style.py b/plot/style.py
index fd1fa97..21c4e7e 100644
--- a/plot/style.py
+++ b/plot/style.py
@@ -7,7 +7,7 @@ class Style(namedtuple('SS', ['marker', 'line', 'color'])):
7 7
8class StyleMap(object): 8class StyleMap(object):
9 '''Maps configs (dicts) to specific line styles.''' 9 '''Maps configs (dicts) to specific line styles.'''
10 DEFAULT = Style('', '', 'k') 10 DEFAULT = Style('', '-', 'k')
11 11
12 def __init__(self, col_list, col_values): 12 def __init__(self, col_list, col_values):
13 '''Assign (some) columns in @col_list to fields in @Style to vary, and 13 '''Assign (some) columns in @col_list to fields in @Style to vary, and
@@ -15,7 +15,8 @@ class StyleMap(object):
15 self.value_map = {} 15 self.value_map = {}
16 self.field_map = {} 16 self.field_map = {}
17 17
18 for field, values in self.__get_all()._asdict().iteritems(): 18 # TODO: undo this, switch to popping mechanism
19 for field, values in reversed([x for x in self.__get_all()._asdict().iteritems()]):
19 if not col_list: 20 if not col_list:
20 break 21 break
21 22
@@ -51,7 +52,6 @@ class StyleMap(object):
51 key = [] 52 key = []
52 53
53 for column, values in self.value_map.iteritems(): 54 for column, values in self.value_map.iteritems():
54 # print("***%s, %s" % column, values)
55 for v in values.keys(): 55 for v in values.keys():
56 sdict = dict([(column, v)]) 56 sdict = dict([(column, v)])
57 style = self.get_style(sdict) 57 style = self.get_style(sdict)