1
"""Tutorial 2 (IPython) - Getting at our first plot using IPython
3
This addendum to Tutorial 2 demonstrates the dynamic nature of the various
6
To run this tutorial, change to the directory where this file is located,
11
Then just run this tutorial:
13
run tutorial2_ipython.py
15
Once this executes, you will have a Chaco plot window open, and all of the
16
functions defined in this file will be available at the IPython prompt.
17
(The "plot" variables will also be defined.)
19
You can configure some aspects of your plot by using the functions.
22
from tutorial2 import demo
24
demo.configure_traits()
28
plot.x_axis.title = text
32
plot.y_axis.title = text
35
def xrange(low, high):
36
plot.x_mapper.range.low = low
37
plot.x_mapper.range.high = high
39
def yrange(low, high):
40
plot.y_mapper.range.low = low
41
plot.y_mapper.range.high = high