Skip to content

lines.py

rerun.log.lines

def log_line_strip(entity_path, positions, *, stroke_width=None, color=None, draw_order=None, ext=None, timeless=False, recording=None)

Log a line strip through 2D or 3D space.

A line strip is a list of points connected by line segments. It can be used to draw approximations of smooth curves.

The points will be connected in order, like so:

       2------3     5
      /        \   /
0----1          \ /
                 4

Parameters:

Name Type Description Default
entity_path str

Path to the path in the space hierarchy

required
positions Optional[npt.ArrayLike]

An Nx2 or Nx3 array of points along the path.

required
stroke_width Optional[float]

Optional width of the line.

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
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 lines is 20.0.

None
ext Optional[Dict[str, Any]]

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the path 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_line_segments(entity_path, positions, *, stroke_width=None, color=None, draw_order=None, ext=None, timeless=False, recording=None)

Log many 2D or 3D line segments.

The points will be connected in even-odd pairs, like so:

       2------3     5
                   /
0----1            /
                 4

Parameters:

Name Type Description Default
entity_path str

Path to the line segments in the space hierarchy

required
positions npt.ArrayLike

An Nx2 or Nx3 array of points. Even-odd pairs will be connected as segments.

required
stroke_width Optional[float]

Optional width of the line.

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
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 lines is 20.0.

None
ext Optional[Dict[str, Any]]

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the line segments 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