Visualization for Geometric Statistics.

class geomstats.visualization.Arrow3D(point, vector)[source]

An arrow in 3d, i.e. a point and a vector.

draw(ax, **quiver_kwargs)[source]

Draw the arrow in 3D plot.

class geomstats.visualization.Circle(n_angles=100, points=None)[source]

Class used to draw a circle.

class geomstats.visualization.PoincareHalfPlane(points=None)[source]

Class used to plot points in the Poincare Half Plane.

class geomstats.visualization.PoincarePolyDisk(points=None, point_type='ball', n_disks=2)[source]

Class used to plot points in the Poincare polydisk.


Add points to draw.


Clear the points to draw.

static convert_to_poincare_coordinates(points)[source]

Convert points to poincare coordinates.

draw(ax, **kwargs)[source]


static set_ax(ax=None)[source]

Define the ax parameters.

class geomstats.visualization.Sphere(n_meridians=40, n_circles_latitude=None, points=None)[source]

Create the arrays sphere_x, sphere_y, sphere_z to plot a sphere.

Create the arrays sphere_x, sphere_y, sphere_z of values to plot the wireframe of a sphere. Their shape is (n_meridians, n_circles_latitude).


Spherical Fibonacci point sets yield nearly uniform point distributions on the unit sphere.

plot_heatmap(ax, scalar_function, n_points=16000, alpha=0.2, cmap='jet')[source]

Plot a heatmap defined by a loss on the sphere.

class geomstats.visualization.Trihedron(point, vec_1, vec_2, vec_3)[source]

A trihedron, i.e. 3 Arrow3Ds at the same point.

draw(ax, **arrow_draw_kwargs)[source]

Draw the trihedron by drawing its 3 Arrow3Ds.

Arrows are drawn is order using green, red, and blue to show the trihedron’s orientation.

geomstats.visualization.convert_to_trihedron(point, space=None)[source]

Transform a rigid point into a trihedron.

Transform a rigid point into a trihedron s.t.: - the trihedron’s base point is the translation of the origin of R^3 by the translation part of point, - the trihedron’s orientation is the rotation of the canonical basis of R^3 by the rotation part of point.

geomstats.visualization.plot(points, ax=None, space=None, point_type='extrinsic', **point_draw_kwargs)[source]

Plot points in the 3D Special Euclidean Group.

Plot points in the 3D Special Euclidean Group, by showing them as trihedrons.