aboutsummaryrefslogtreecommitdiffstats
path: root/plot/style.py
diff options
context:
space:
mode:
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)