~ubuntu-branches/ubuntu/oneiric/python-chaco/oneiric

« back to all changes in this revision

Viewing changes to examples/tutorials/scipy2008/traits_image.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-08 20:38:02 UTC
  • mfrom: (7.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110708203802-5t32e0ldv441yh90
Tags: 4.0.0-1
* New upstream release
* debian/control:
  - Depend on python-traitsui (Closes: #633604)
  - Bump Standards-Version to 3.9.2
* Update debian/watch file
* Remove debian/patches/* -- no longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
from numpy import linspace, meshgrid, exp
3
3
 
4
 
from enthought.chaco.api import ArrayPlotData, Plot, jet
5
 
from enthought.enable.component_editor import ComponentEditor
6
 
from enthought.traits.api import Enum, HasTraits, Instance
7
 
from enthought.traits.ui.api import Group, Item, View
 
4
from chaco.api import ArrayPlotData, Plot, jet
 
5
from enable.component_editor import ComponentEditor
 
6
from traits.api import Enum, HasTraits, Instance
 
7
from traitsui.api import Group, Item, View
8
8
 
9
9
class ImagePlotTraits(HasTraits):
10
10
 
21
21
                    )
22
22
 
23
23
    def __init__(self):
24
 
        # Create the data and the PlotData object.  For a 2D plot, we need to 
 
24
        # Create the data and the PlotData object.  For a 2D plot, we need to
25
25
        # take the row of X points and Y points and create a grid from them
26
26
        # using meshgrid().
27
27
        x = linspace(0, 8, 50)
39
39
    def _origin_changed(self):
40
40
        self.renderer.origin = self.origin
41
41
        self.plot.request_redraw()
42
 
        
 
42
 
43
43
#===============================================================================
44
44
# demo object that is used by the demo.py application.
45
45
#===============================================================================