""" Test script-oriented example from interactive plotting tutorial

source: docs/source/user_manual/chaco_tutorial.rst

"""
import unittest
from numpy import linspace, pi, sin
from enthought.chaco.shell import plot, show, title, ytitle


class InteractiveTestCase(unittest.TestCase):

    def test_script(self):
        x = linspace(-2*pi, 2*pi, 100)
        y = sin(x)
        plot(x, y, "r-")
        title("First plot")
        ytitle("sin(x)")

if __name__ == "__main__":
    unittest.main()

""" Test script-oriented example from interactive plotting tutorial

source: docs/source/user_manual/chaco_tutorial.rst

"""
import unittest
from numpy import linspace, pi, sin
from chaco.shell import plot, title, ytitle


class InteractiveTestCase(unittest.TestCase):

    def test_script(self):
        x = linspace(-2*pi, 2*pi, 100)
        y = sin(x)
        plot(x, y, "r-")
        title("First plot")
        ytitle("sin(x)")

if __name__ == "__main__":
    unittest.main()

Clean up: pyflakes and remove enthought.chaco import. We should and will update the tutorial later.