Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Quick fix for gray on NaNs

This commit is contained in:
Arnar Flatberg 2007-08-14 16:10:35 +00:00
parent 13b35180ee
commit 004cfe0a9f
1 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,7 @@ class Plot(view.View):
control : intersection control : intersection
""" """
print "Inside update selection, key: %s" %key
if key == 'shift': if key == 'shift':
ids = set(ids).union(self._current_selection[self.current_dim]) ids = set(ids).union(self._current_selection[self.current_dim])
elif key == 'control': elif key == 'control':
@ -491,6 +492,12 @@ class ScatterPlot(Plot):
self.sc.set_array(map_vec) self.sc.set_array(map_vec)
self.sc.set_clim(vec_min, vec_max) self.sc.set_clim(vec_min, vec_max)
self.sc.update_scalarmappable() #sets facecolors from array self.sc.update_scalarmappable() #sets facecolors from array
if hasattr(self.sc.cmap, "_lut"):
print "changing lut"
self.sc.cmap._lut[-1,:] = [.5,.5,.5,1]
self.sc.cmap._lut[0,:] = [.5,.5,.5,1]
else:
print "No lut present"
self.canvas.draw() self.canvas.draw()
def rectangle_select_callback(self, x1, y1, x2, y2, key): def rectangle_select_callback(self, x1, y1, x2, y2, key):