File: rect_zoom.py

package info (click to toggle)
python-chaco 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 15,144 kB
  • sloc: python: 35,936; ansic: 1,211; cpp: 241; makefile: 124; sh: 5
file content (19 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
""" Defines the RectZoomTool class.
"""
from zoom_tool import ZoomTool

class RectZoomTool(ZoomTool):
    """
    Allows the user to drag a zoom box around a region of the plot.

    This is a subclass of ZoomTool, with different default values for some
    traits.
    """

    # Selects a box in two dimensions (overrides SimpleZoom).
    tool_mode = "box"

    # The tool is always on; left-clicking initiates a zoom (overrides
    # SimpleZoom).
    always_on = True