Skip to content

points.py

rerun.log.points

def log_point(entity_path, position=None, *, radius=None, color=None, label=None, class_id=None, keypoint_id=None, draw_order=None, ext=None, timeless=False, recording=None)

Log a 2D or 3D point, with a position and optional color, radii, label, etc.

Logging again to the same entity_path will replace the previous point.

Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA represented as a 2-element or 3-element sequence.

Supported dtypes for color:
  • uint8: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
  • float32/float64: all color components should be in 0-1 linear space.

Parameters:

Name Type Description Default
entity_path str

Path to the point in the space hierarchy.

required
position Optional[npt.ArrayLike]

Any 2-element or 3-element array-like.

None
radius Optional[float]

Optional radius (make it a sphere).

None
color Optional[Color]

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

None
label Optional[str]

Optional text to show with the point.

None
class_id Optional[int]

Optional class id for the point. The class id provides color and label if not specified explicitly. See rerun.log_annotation_context

None
keypoint_id Optional[int]

Optional key point id for the point, identifying it within a class. If keypoint_id is passed but no class_id was specified, class_id will be set to 0. This is useful to identify points within a single classification (which is identified with class_id). E.g. the classification might be 'Person' and the keypoints refer to joints on a detected skeleton. See rerun.log_annotation_context

None
draw_order Optional[float]

An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values. The default for 2D points is 30.0.

None
ext Optional[Dict[str, Any]]

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the point will be timeless (default: False).

False
recording Optional[RecordingStream]

Specifies the rerun.RecordingStream to use. If left unspecified, defaults to the current active data recording, if there is one. See also: rerun.init, rerun.set_global_data_recording.

None

def log_points(entity_path, positions=None, *, identifiers=None, colors=None, radii=None, labels=None, class_ids=None, keypoint_ids=None, draw_order=None, ext=None, timeless=False, recording=None)

Log 2D or 3D points, with positions and optional colors, radii, labels, etc.

Logging again to the same entity_path will replace all the previous points.

Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA. You can supply no colors, one color, or one color per point in a Nx3 or Nx4 numpy array.

Supported dtypes for colors:
  • uint8: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
  • float32/float64: all color components should be in 0-1 linear space.

Parameters:

Name Type Description Default
entity_path str

Path to the points in the space hierarchy.

required
positions Optional[npt.ArrayLike]

Nx2 or Nx3 array

None
identifiers Optional[npt.ArrayLike]

Unique numeric id that shows up when you hover or select the point.

None
colors Optional[Union[Color, Colors]]

Optional colors of the points. The colors are interpreted as RGB or RGBA in sRGB gamma-space, as either 0-1 floats or 0-255 integers, with separate alpha.

None
radii Optional[npt.ArrayLike]

Optional radii (make it a sphere).

None
labels Optional[Sequence[str]]

Optional per-point text to show with the points

None
class_ids OptionalClassIds

Optional class ids for the points. The class id provides colors and labels if not specified explicitly. See rerun.log_annotation_context

None
keypoint_ids OptionalKeyPointIds

Optional key point ids for the points, identifying them within a class. If keypoint_ids are passed in but no class_ids were specified, class_id will be set to 0. This is useful to identify points within a single classification (which is identified with class_id). E.g. the classification might be 'Person' and the keypoints refer to joints on a detected skeleton. See rerun.log_annotation_context

None
draw_order Optional[float]

An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values. The default for 2D points is 30.0.

None
ext Optional[Dict[str, Any]]

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the points will be timeless (default: False).

False
recording Optional[RecordingStream]

Specifies the rerun.RecordingStream to use. If left unspecified, defaults to the current active data recording, if there is one. See also: rerun.init, rerun.set_global_data_recording.

None