'Add the points to the mayavi pipeline'

@on_trait_change('scene.activated')
def _plot_points(self):

    from . import _testing_mode
    if hasattr(self.glyph, 'remove'):
        self.glyph.remove()
    if hasattr(self.src, 'remove'):
        self.src.remove()
    _toggle_mlab_render(self, False)
    (x, y, z) = self.points.T
    scatter = pipeline.scalar_scatter(x, y, z)
    fig = (self.scene.mayavi_scene if (not _testing_mode()) else None)
    glyph = pipeline.glyph(scatter, color=self.color, figure=fig, scale_factor=self.point_scale, opacity=1.0, resolution=self.resolution)
    glyph.actor.property.backface_culling = True
    self.src = scatter
    self.glyph = glyph
    self.sync_trait('point_scale', self.glyph.glyph.glyph, 'scale_factor')
    self.sync_trait('color', self.glyph.actor.property, mutual=False)
    self.sync_trait('visible', self.glyph)
    self.sync_trait('opacity', self.glyph.actor.property)
    self.on_trait_change(self._update_points, 'points')
    _toggle_mlab_render(self, True)
