Commit e5b73fb2 authored by Ronny Eichler's avatar Ronny Eichler
Browse files

Minor: housekeeping

parent c5e0bf98
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
############# #############
testing/ testing/
dataman/vis/data data/
############# #############
## Python ## Python
......
__author__ = 'reichler'
...@@ -32,8 +32,8 @@ n = 3e4 ...@@ -32,8 +32,8 @@ n = 3e4
# Buffer # Buffer
buf = np.zeros((m, n), dtype=np.float32) buf = np.zeros((m, n), dtype=np.float32)
# Color of each vertex (TODO: make it more efficient by using a GLSL-based # Color of each vertex
# color map and the index). # TODO: make it more efficient by using a GLSL-based color map and the index.
color = np.repeat(np.random.uniform(size=(nrows, 3), low=.1, high=.9), color = np.repeat(np.random.uniform(size=(nrows, 3), low=.1, high=.9),
n*ncols, axis=0).astype(np.float32) n*ncols, axis=0).astype(np.float32)
...@@ -136,7 +136,6 @@ class Vis(app.Canvas): ...@@ -136,7 +136,6 @@ class Vis(app.Canvas):
self.set_offset(absolute=self.drag_offset-shift_offset) self.set_offset(absolute=self.drag_offset-shift_offset)
if event.button == 2: if event.button == 2:
print dx/width, dy/height
self.set_scale(scale_x=1.0*math.exp(dx/width), self.set_scale(scale_x=1.0*math.exp(dx/width),
scale_y=1.0*math.exp(dy/height)) scale_y=1.0*math.exp(dy/height))
...@@ -154,7 +153,6 @@ class Vis(app.Canvas): ...@@ -154,7 +153,6 @@ class Vis(app.Canvas):
dx = -np.sign(event.delta[1])*int(event.delta[1]**2) dx = -np.sign(event.delta[1])*int(event.delta[1]**2)
self.set_offset(relative=dx) self.set_offset(relative=dx)
else: else:
# Zooooom
delta = np.sign(event.delta[1]) * .05 delta = np.sign(event.delta[1]) * .05
if util.keys.SHIFT in event.modifiers: if util.keys.SHIFT in event.modifiers:
self.set_scale(factor_x=math.exp(2.5*delta)) self.set_scale(factor_x=math.exp(2.5*delta))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment