Sort <colors> as they are written to plots.xml

This commit is contained in:
Paul Romano 2017-03-21 06:48:21 -05:00
parent 5a116aedb3
commit 033197a091

View file

@ -636,7 +636,8 @@ class Plot(object):
subelement.text = ' '.join(str(x) for x in color)
if self._colors:
for domain, color in self._colors.items():
for domain, color in sorted(self._colors.items(),
key=lambda x: x[0].id):
subelement = ET.SubElement(element, "color")
subelement.set("id", str(domain.id))
if isinstance(color, string_types):