esc
Start typing to search the docs
Navigate Open

Show a subset of plotted series

When you log several values in one Scalars batch, such as the joint positions of a robot arm, each value is plotted as its own series in a TimeSeriesView. You can show only some of them from the Viewer or from code.

In the Viewer

Click a series in the plot legend to hide or show it. The Viewer stores this choice in the blueprint.

From code

Set visible_series of SeriesLines as a blueprint override. It takes one boolean per series, in the order of the values in the batch. If the list is shorter than the number of series, its last value is repeated. Hidden series stay in the legend, so you can click them to show them again. For series drawn as points, use SeriesPoints instead.

"""Show one series of a multi-value `Scalars` batch."""

from __future__ import annotations

import math

import rerun as rr
import rerun.blueprint as rrb

rr.init("rerun_example_visible_series", spawn=True)

for t in range(50):
    rr.set_time("step", sequence=t)
    positions = [math.sin(t / 10 + j) for j in range(7)]
    rr.log("robot/joint_positions", rr.Scalars(positions))

# Show only the third joint
rr.send_blueprint(
    rrb.TimeSeriesView(
        overrides={
            "robot/joint_positions": rr.SeriesLines(
                visible_series=[False, False, True, False, False, False, False]
            ),
        },
    ),
)