title: How to change tube radius of a line plot in Mayavi?
body: <p>I am trying to dynamically modify the tube radius of a 3D line plot in Mayavi2. For example</p>
  
  <pre><code>from traits.api import HasTraits, Float, Instance, on_trait_change
  from traitsui.api import View, Item, Group
  from mayavi.core.api import PipelineBase
  from mayavi.core.ui.api import MayaviScene, SceneEditor, MlabSceneModel
  import numpy
  
  def curve():
      n_mer, n_long = 6, 11
      pi = numpy.pi
      dphi = pi / 1000.0
      phi = numpy.arange(0.0, 2 * pi + 0.5 * dphi, dphi)
      mu = phi * n_mer
      x = numpy.cos(mu) * (1 + numpy.cos(n_long * mu / n_mer) * 0.5)
      y = numpy.sin(mu) * (1 + numpy.cos(n_long * mu / n_mer) * 0.5)
      z = numpy.sin(n_long * mu / n_mer) * 0.5
      t = numpy.sin(mu)
  
      return x, y, z, t
  
  class MyModel(HasTraits):
      radius = Float(0.025)
      scene = Instance(MlabSceneModel, ())
      plot = Instance(PipelineBase)
  
      @on_trait_change('radius,scene.activated')
      def update_plot(self):
          x, y, z, t = curve()
          if self.plot is None:
              self.plot = self.scene.mlab.plot3d(x, y, z, t,
                                  tube_radius=self.radius, colormap='Spectral')
          else:
              print self.radius
              self.plot.mlab_source.set(tube_radius=self.radius)
              self.scene.mlab.draw()
  
      view = View(Item('scene', editor=SceneEditor(scene_class=MayaviScene),
                       height=250, width=300, show_label=False),
                  Group(
                          'radius',
                       ),
                  resizable=True,
                  )
  
  my_model = MyModel()
  my_model.configure_traits()
  </code></pre>
  
  <p>This gives:</p>
  
  <p><img src="https://i.stack.imgur.com/zjLDH.png" alt="enter image description here"></p>
  
  <p>However, when I change the radius nothing happens with the visual line plot.</p>