~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to examples/tutorials/tutorial4.py

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""Tutorial 4. Adding a zoom tool
2
 
 
3
 
The ZoomTool tool has a visual component, so it needs to be added to the
4
 
list of overlays instead of the list of bare tools.
5
 
"""
6
 
 
7
 
from chaco.tools.api import ZoomTool
8
 
 
9
 
from tutorial2 import demo
10
 
 
11
 
plot = demo.plot
12
 
plot.overlays.append(ZoomTool(plot, tool_mode="box", always_on=True))
13
 
 
14
 
if __name__ == "__main__":
15
 
    demo.configure_traits()