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

« back to all changes in this revision

Viewing changes to examples/tutorials/tutorial10.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 10. Demonstration that the views are linked, but the data is not."""
2
 
 
3
 
 
4
 
from chaco.tools.api import LineInspector
5
 
 
6
 
from tutorial9b import PlotExample2
7
 
 
8
 
 
9
 
class PlotExample3(PlotExample2):
10
 
    def _container_default(self):
11
 
        container = super(PlotExample3, self)._container_default()
12
 
 
13
 
        rplot, lplot = self.right_plot, self.left_plot
14
 
        lplot.overlays.append(LineInspector(component=lplot,
15
 
                write_metadata=True, is_listener=True))
16
 
        rplot.overlays.append(LineInspector(component=rplot,
17
 
                write_metadata=True, is_listener=True))
18
 
 
19
 
        return container
20
 
 
21
 
demo = PlotExample3()
22
 
 
23
 
if __name__ == "__main__":
24
 
    demo.configure_traits()