Fixing order of positions in colormap

This commit is contained in:
Lionel Martin 2016-02-10 10:08:39 +01:00
parent fd76443458
commit 20ee97cd44

View File

@ -66,7 +66,9 @@ class ColorMap(object):
=============== ==============================================================
"""
self.pos = np.array(pos)
self.color = np.array(color)
order = np.argsort(self.pos)
self.pos = self.pos[order]
self.color = np.array(color)[order]
if mode is None:
mode = np.ones(len(pos))
self.mode = mode