Improved drag'n'drop of data into scatter plots so that it no longer requires
matching identifiers along dimensions.
This commit is contained in:
@@ -726,8 +726,8 @@ class DagPlot(plots.Plot):
|
||||
nodes = ds.existing_identifiers(self.current_dim, self.nodes)
|
||||
|
||||
v = vec.take(indices, 0)
|
||||
vec_min = min(v[v > -inf])
|
||||
vec_max = max(v[v < inf])
|
||||
vec_min = min(vec[vec > -inf])
|
||||
vec_max = max(vec[vec < inf])
|
||||
v[v==inf] = vec_max
|
||||
v[v==-inf] = vec_min
|
||||
|
||||
@@ -739,7 +739,7 @@ class DagPlot(plots.Plot):
|
||||
|
||||
# update facecolors
|
||||
self.node_collection.set_array(map_vec)
|
||||
self.node_collection.set_clim(map_vec.min(), map_vec.max())
|
||||
self.node_collection.set_clim(vec_min, vec_max)
|
||||
self.node_collection.update_scalarmappable() #sets facecolors from array
|
||||
self.canvas.draw()
|
||||
|
||||
|
Reference in New Issue
Block a user