Functions | |
def | plot |
plot 3D points connected to each other Check mlab.points3d documentation for details. | |
def | plot_cuboid |
Plot a yellow cuboid. | |
def | plot_points |
plot 3D points as a cloud. | |
def | plot_quiver |
plot points and arrows. | |
def | savefig |
save plot as a png | |
def | show |
show the plot. | |
def | white_bg |
make a figure with a white background. | |
Variables | |
list | color_list |
tuple | pts = np.matrix(np.random.uniform(size=(3,5000))) |
def hrl_lib.mayavi2_util.plot | ( | pts, | |
color = (1.,1. , |
|||
scalar_list = None |
|||
) |
plot 3D points connected to each other Check mlab.points3d documentation for details.
pts | - 3xN numpy matrix of points. |
color | - 3 tuple of color. (float b/w 0 and 1) |
mode | - how to display the points ('point','sphere','cube' etc.) |
scale_fator | - controls size of the spheres. not sure what it means. |
Definition at line 55 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.plot_cuboid | ( | corner_tups | ) |
Plot a yellow cuboid.
cuboid is defined by 12 tuples of corners that define the 12 edges, as returned by occupancy_grig.grid_lines() function.
Definition at line 100 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.plot_points | ( | pts, | |
color = (1.,1. , |
|||
scale_factor = 0.02 , |
|||
mode = 'point' , |
|||
scalar_list = None |
|||
) |
plot 3D points as a cloud.
Check mlab.points3d documentation for details.
pts | - 3xN numpy matrix of points. |
color | - 3 tuple of color. (float b/w 0 and 1) |
mode | - how to display the points ('point','sphere','cube' etc.) |
scale_fator | - controls size of the spheres. not sure what it means. |
Definition at line 70 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.plot_quiver | ( | pts, | |
vecs, | |||
color = (0.,1. , |
|||
arrow_scale = 0.05 , |
|||
point_mode = 'sphere' , |
|||
point_scale = 0.002 |
|||
) |
plot points and arrows.
pts | - 3xN np matrix |
vecs | - 3xN np matrix of arrow vectors |
color | - of the arrows |
Definition at line 82 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.savefig | ( | name, | |
size | |||
) |
save plot as a png
name | - file name size - (r,c) e.g. (1024, 768) |
Definition at line 46 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.show | ( | ) |
show the plot.
call this function after plotting everything.
Definition at line 110 of file mayavi2_util.py.
def hrl_lib.mayavi2_util.white_bg | ( | ) |
make a figure with a white background.
Definition at line 39 of file mayavi2_util.py.
00001 [(1.,1.,1.),(1.,0.,0.),(0.,1.,0.),(0.,0.,1.),(1.,1.,0.),(1.,0.,1.),\ 00002 (0.,1.,1.),(0.5,1.,0.5),(1.,0.5,0.5)]
Definition at line 34 of file mayavi2_util.py.
tuple hrl_lib::mayavi2_util::pts = np.matrix(np.random.uniform(size=(3,5000))) |
Definition at line 115 of file mayavi2_util.py.