Commits

Michael Forbes committed 8788c76

Fixed warnings (update_plot called during __init__ when values assigned).

  • Participants
  • Parent commits 0e19e62

Comments (0)

Files changed (1)

 
 from matplotlib import pyplot as plt
 
-from traits.api import HasTraits, Str, Range, Bool, on_trait_change
+from traits.api import HasTraits, Str, Range, Any, Bool, on_trait_change
 from traitsui.api import View, Item
 
 
     r"""Represents the noise and applied filters."""
     
     def __init__(self, *v, **kw):
-        HasTraits.__init__(self, *v, **kw)
         self.t = np.linspace(0, 1, 100)
         plt.clf()
         self.line = plt.plot(self.t, 0 * self.t)[0]
-        plt.ylim([-1,1])
+        plt.ylim([-1, 1])
         plt.xlabel('t')
         plt.ylabel('y')
-        self.update_plot()
+        HasTraits.__init__(self, *v, **kw)
 
     amplitude = Range(0.0, 1.0)
     phase = Range(-1.0, 1.0)