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

« back to all changes in this revision

Viewing changes to examples/tutorials/scipy2008/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 HasTraits, Instance
7
 
from enthought.traits.ui.api import Item, View
 
4
from chaco.api import ArrayPlotData, Plot, jet
 
5
from enable.component_editor import ComponentEditor
 
6
from traits.api import HasTraits, Instance
 
7
from traitsui.api import Item, View
8
8
 
9
9
class ImagePlot(HasTraits):
10
10
 
11
11
    plot = Instance(Plot)
12
12
 
13
 
    traits_view = View(Item('plot', editor=ComponentEditor(), show_label=False), 
14
 
                       width=600, height=600, 
 
13
    traits_view = View(Item('plot', editor=ComponentEditor(), show_label=False),
 
14
                       width=600, height=600,
15
15
                       resizable=True,
16
16
                       title="Chaco Plot")
17
17
 
18
18
    def __init__(self):
19
 
        # Create the data and the PlotData object.  For a 2D plot, we need to 
 
19
        # Create the data and the PlotData object.  For a 2D plot, we need to
20
20
        # take the row of X points and Y points and create a grid from them
21
21
        # using meshgrid().
22
22
        x = linspace(0, 10, 50)