1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
"""Displays different types of glyphs oriented and colored as per
vector data at the input points. This is merely a convenience module
that is entirely based on the Glyph module.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005, Enthought, Inc.
# License: BSD Style.
# Local imports
from mayavi.modules.glyph import Glyph
######################################################################
# `Vectors` class.
######################################################################
class Vectors(Glyph):
######################################################################
# `Module` interface
######################################################################
def setup_pipeline(self):
super(Vectors, self).setup_pipeline()
self.glyph.trait_set(scale_mode='scale_by_vector',
color_mode='color_by_vector',
show_scale_mode=False)
self.glyph.glyph_source.glyph_position='tail'
|