1
"""This example displays some line plots in different colors and styles using
2
the chaco.shell subpackage.
4
The functions in the chaco.shell package allow us to quickly generate plots
5
with some basic interactivity without using the object-oriented core of Chaco.
8
from numpy import linspace, pi, sin, cos
9
from chaco.shell import plot, hold, title, show
12
x = linspace(-2*pi, 2*pi, 100)
16
# Create some line plots using the plot() command and using
17
# Matlab-style format specifiers
18
plot(x, y1, "b-", bgcolor="white")
20
plot(x, y2, "g-.", marker_size=2)
23
title("simple line plots")
25
# If running this from the command line and outside of a wxPython
26
# application or process, the show() command is necessary to keep
27
# the plot from disappearing instantly. If a wxPython mainloop
28
# is already running, then this command is not necessary.