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()

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.
Clean up: pyflakes and remove enthought.chaco import. We should and will update the tutorial later.

  import unittest
  from numpy import linspace, pi, sin
- from enthought.chaco.shell import plot, show, title, ytitle
+ 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.
## Code Before:
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()

## Instruction:
Clean up: pyflakes and remove enthought.chaco import. We should and will update the tutorial later.
## Code After:
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()
