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

« back to all changes in this revision

Viewing changes to examples/financial/stock_prices.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-04-06 19:03:54 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110406190354-rwd55l2ezjecfo41
Tags: 3.4.0-2
d/rules: fix pyshared directory path (Closes: #621116)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from enthought.chaco.scales.api import CalendarScaleSystem
31
31
from enthought.chaco.scales_tick_generator import ScalesTickGenerator
32
 
from enthought.chaco.scales_axis import PlotAxis as ScalesPlotAxis
33
32
 
34
33
 
35
34
def create_dates(numpoints, units="days"):
166
165
        # Set the plot's bottom axis to use the Scales ticking system
167
166
        ticker = ScalesTickGenerator(scale=CalendarScaleSystem())
168
167
        for plot in price_plot, mini_plot, vol_plot:
169
 
            bottom_axis = ScalesPlotAxis(plot, orientation="bottom", 
170
 
                                         tick_generator = ticker)
 
168
            bottom_axis = PlotAxis(plot, orientation="bottom", 
 
169
                                   tick_generator = ticker)
171
170
            plot.overlays.append(bottom_axis)
172
171
            plot.overlays.append(PlotAxis(plot, orientation="left"))
173
172
            hgrid, vgrid = add_default_grids(plot)