Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/source/user_manual/tutorial_van_der_waal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ The following is the code for these two needs::
self.pressure = ((self.r_constant*self.temperature)
/(self.volume - self.totVolume)
-(self.attraction/(self.volume*self.volume)))
return

The :func:`calc` function computes the :attr:`pressure` array using the current
values of the independent variables. Meanwhile, the
Expand Down
2 changes: 0 additions & 2 deletions examples/demo/advanced/data_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def _index_callback(self, tool, x_index, y_index):
self.center.invalidate_and_redraw()
self.right.invalidate_and_redraw()
self.bottom.invalidate_and_redraw()
return

def _wheel_callback(self, tool, wheelamt):
plane_slice_dict = {"xy": ("slice_z", 2),
Expand All @@ -220,7 +219,6 @@ def _wheel_callback(self, tool, wheelamt):
self.center.invalidate_and_redraw()
self.right.invalidate_and_redraw()
self.bottom.invalidate_and_redraw()
return

def _create_window(self):
# Create the model
Expand Down
2 changes: 0 additions & 2 deletions examples/demo/advanced/data_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def timer_tick(self, *args):

self.viewer.index = new_index
self.viewer.data = new_data
return

def _distribution_type_changed(self):
# This listens for a change in the type of distribution to use.
Expand All @@ -122,7 +121,6 @@ def closed(self, info, is_ok):
"""

info.object.timer.Stop()
return


class Demo(HasTraits):
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/advanced/javascript_hover_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def main(embedded=False):
print('Browser did not open properly. Exception %s. The results' \
'can be viewed with the file plot_hover_coords.html.' % str(e))
raise
return


#===============================================================================
# # Demo class that is used by the demo.py application.
Expand Down
5 changes: 2 additions & 3 deletions examples/demo/advanced/spec_waterfall.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def _gather_points(self):

self._cached_data_pts = [transpose(array((index, v))) for v in values]
self._cache_value = True
return

def get_screen_points(self):
self._gather_points()
Expand Down Expand Up @@ -160,7 +159,7 @@ def onTimer(self, *args):
spec_data = self.spectrogram_plot.values[1:] + [spectrum]
self.spectrogram_plot.values = spec_data
self.spectrum_plot.request_redraw()
return


#============================================================================
# Attributes to use for the plot view.
Expand All @@ -179,7 +178,7 @@ def closed(self, info, is_ok):
"""

info.object.timer.Stop()
return


class Demo(HasTraits):

Expand Down
3 changes: 1 addition & 2 deletions examples/demo/advanced/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def onTimer(self, *args):

self.spectrogram_plotdata.set_data('imagedata', spectrogram_data)
self.spectrum_plot.request_redraw()
return

#============================================================================
# Attributes to use for the plot view.
Expand All @@ -147,7 +146,7 @@ def closed(self, info, is_ok):
"""

info.object.timer.Stop()
return


class Demo(HasTraits):

Expand Down
2 changes: 1 addition & 1 deletion examples/demo/basic/image_lasso.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def lasso_updated(lasso_tool, name, old, new_selections):
# Now map each point into the grid index
for x, y in screen_pts:
print("\t", lasso_tool.plot.map_index((x, y)))
return


def _create_plot_component():# Create a scalar field to colormap
xbounds = (-2*pi, 2*pi, 600)
Expand Down
2 changes: 0 additions & 2 deletions examples/demo/canvas/axis_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def normal_left_down(self, event):
axis.request_redraw()
plot._debug = True
event.handled = True
return

def normal_left_up(self, event):
if self.component is None:
Expand All @@ -122,7 +121,6 @@ def normal_left_up(self, event):

axis.request_redraw()
event.handled = True
return


class MPAxisTool(AxisTool):
Expand Down
1 change: 0 additions & 1 deletion examples/demo/canvas/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ def clone_plot(clonetool, drop_position):
newplot.invalidate_draw()
newplot.request_redraw()
canvas.request_redraw()
return


def make_toolbar(canvas):
Expand Down
7 changes: 1 addition & 6 deletions examples/demo/canvas/cliptest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,30 @@ def _draw_mainlayer(self, gc, view_bounds=None, mode="default"):
#gc.rect(self.outer_x, self.outer_y, self.outer_width, self.outer_height)
#gc.stroke_path()

return

def normal_left_down(self, event):
self.event_state = "moving"
event.window.set_pointer(self.moving_pointer)
event.window.set_mouse_owner(self, event.net_transform())
self.offset_x = event.x - self.x
self.offset_y = event.y - self.y
event.handled = True
return

def moving_mouse_move(self, event):
self.position = [event.x-self.offset_x, event.y-self.offset_y]
event.handled = True
self.request_redraw()
return

def moving_left_up(self, event):
self.event_state = "normal"
event.window.set_pointer(self.normal_pointer)
event.window.set_mouse_owner(None)
event.handled = True
self.request_redraw()
return

def moving_mouse_leave(self, event):
self.moving_left_up(event)
event.handled = True
return


class MainFrame(DemoFrame):
def _create_window(self):
Expand Down
5 changes: 0 additions & 5 deletions examples/demo/canvas/data_source_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def notify(self, button, type, event):
#if not control_down:
if 1:
self.button_deselected(button)
return

def button_selected(self, button):
if DEBUG:
Expand All @@ -76,7 +75,6 @@ def button_selected(self, button):
else:
return
button.button_state = "down"
return

def button_deselected(self, button):
if DEBUG:
Expand All @@ -99,7 +97,6 @@ def button_deselected(self, button):
else:
return
button.button_state = "up"
return

def show_scatterplot(self, b1, b2):
if len(self.plot.plots) > 0:
Expand Down Expand Up @@ -191,13 +188,11 @@ def show_overlay(self):
self._do_layout()
self.plot_overlay.visible = True
self.request_redraw()
return

def hide_overlay(self):
if self.plot_overlay is not None:
self.plot_overlay.visible = False
self.request_redraw()
return

def _do_layout(self):
if self.canvas is not None:
Expand Down
1 change: 0 additions & 1 deletion examples/demo/canvas/mp_viewport_pan_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def drag_start(self, event):
self.event_state = "dragging"
event.handled = True
ViewportPanTool.drag_start(self, event)
return

def drag_end(self, event):
event.x, event.y = self._last_blob_pos
Expand Down
1 change: 0 additions & 1 deletion examples/demo/canvas/mptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def drag_start(self, event):
self.mouse_down_position = (event.x,event.y)
self.event_state = "dragging"
event.handled = True
return

def drag_end(self, event):
if hasattr(event, "bid"):
Expand Down
1 change: 0 additions & 1 deletion examples/demo/canvas/plot_clone_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def drag_start(self, event):
self.event_state = "dragging"
event.handled = True
PlotCloneTool.drag_start(self, event)
return

def drag_end(self, event):
if hasattr(event, "bid"):
Expand Down
2 changes: 0 additions & 2 deletions examples/demo/financial/correlations.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ def __init__(self, *symbols, **kwtraits):
if len(self.symbols) > 1:
self.sym2 = self.symbols[1]

return

def _create_returns_plot(self):
plot = Plot(self.plotdata)
plot.legend.visible = True
Expand Down
1 change: 0 additions & 1 deletion examples/demo/noninteractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def draw_plot(filename, size=(800, 600)):
gc = PlotGraphicsContext(size, dpi=DPI)
gc.render_component(container)
gc.save(filename)
return


def draw_svg(filename, size=(800, 600)):
Expand Down
2 changes: 0 additions & 2 deletions examples/demo/updating_plot/updating_plot1.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _create_data(self):
self.y_values = y
self.current_index = numpoints/2
self.increment = 2
return

def _create_window(self):
self._create_data()
Expand Down Expand Up @@ -81,7 +80,6 @@ def onTimer(self, *args):
self.plot.index.set_data(self.x_values[:self.current_index])
self.plot.value.set_data(self.y_values[:self.current_index])
self.plot.request_redraw()
return


if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion examples/demo/updating_plot/updating_plot2.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def _create_window(self):
def onTimer(self, *args):
for plot in self.animated_plots:
plot.timer_tick()
return


if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion examples/demo/updating_plot/updating_plot3.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def _create_window(self):
def onTimer(self, *args):
for plot in self.animated_plots:
plot.timer_tick()
return


if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion examples/demo/updating_plot/updating_plot4.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def _create_window(self):
def onTimer(self, *args):
for plot in self.animated_plots:
plot.timer_tick()
return


if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion examples/demo/updating_plot/updating_plot5.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def _create_window(self):
def onTimer(self, *args):
for plot in self.animated_plots:
plot.timer_tick()
return


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/vtk/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def on_timer(self, vtk_obj=None, eventname=""):

self.spectrogram_plotdata.set_data('imagedata', spectrogram_data)
self.spectrum_plot.request_redraw()
return


def main():
from tvtk.api import tvtk
Expand Down
4 changes: 0 additions & 4 deletions examples/demo/zoomed_plot/zoom_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def overlay(self, component, gc, view_bounds=None, mode="normal"):
gc.lines(right_line)
gc.stroke_path()

return

def _get_selection_screencoords(self):
"""
Returns a tuple of (x1, x2) screen space coordinates of the start
Expand All @@ -103,7 +101,6 @@ def _source_changed(self, old, new):
remove=True)
if new is not None and new.controller is not None:
new.controller.on_trait_change(self._selection_update_handler, "selection")
return

def _selection_update_handler(self, value):
if value is not None and self.destination is not None:
Expand All @@ -114,4 +111,3 @@ def _selection_update_handler(self, value):

self.source.request_redraw()
self.destination.request_redraw()
return
2 changes: 1 addition & 1 deletion examples/tutorials/scipy2008/custom_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ScatterPlotHandler(Handler):

def object_edit_overlay_changed(self, info):
info.object.plot.overlays[-1].edit_traits(parent=info.ui.control)
return


class ScatterPlot(HasTraits):

Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/scipy2008/custom_overlay_dataspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ScatterPlotHandler(Handler):

def object_edit_overlay_changed(self, info):
info.object.plot.overlays[-1].edit_traits(parent=info.ui.control)
return


class ScatterPlot(HasTraits):

Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/scipy2008/custom_overlay_movetool.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ScatterPlotHandler(Handler):

def object_edit_overlay_changed(self, info):
info.object.plot.overlays[-1].edit_traits(parent=info.ui.control)
return


class ScatterPlot(HasTraits):

Expand Down