---
title: "SeriesLines"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

Define the style properties for one or more line series in a chart.

This archetype only provides styling information.
Changes over time are supported for most but not all its fields (see respective fields for details),
it's generally recommended to log this type as static.

The underlying data needs to be logged to the same entity-path using [`archetypes.Scalars`](https://rerun.io/docs/reference/types/archetypes/scalars).
Dimensionality of the scalar arrays logged at each time point is assumed to be the same over time.

## Fields
### Optional
* `colors`: [`Color`](https://rerun.io/docs/reference/types/components/color.md)
* `widths`: [`StrokeWidth`](https://rerun.io/docs/reference/types/components/stroke_width.md)
* `names`: [`Name`](https://rerun.io/docs/reference/types/components/name.md)
* `visible_series`: [`Visible`](https://rerun.io/docs/reference/types/components/visible.md)
* `aggregation_policy`: [`AggregationPolicy`](https://rerun.io/docs/reference/types/components/aggregation_policy.md)
* `interpolation_mode`: [`InterpolationMode`](https://rerun.io/docs/reference/types/components/interpolation_mode.md)


## Can be shown in
* [TimeSeriesView](https://rerun.io/docs/reference/types/views/time_series_view.md)
* [DataframeView](https://rerun.io/docs/reference/types/views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `SeriesLines`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1SeriesLines.html)
 * 🐍 [Python API docs for `SeriesLines`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.SeriesLines)
 * 🦀 [Rust API docs for `SeriesLines`](https://docs.rs/rerun/latest/rerun/archetypes/struct.SeriesLines.html)

## Example

### Line series

```python
"""Log a scalar over time."""

from math import cos, sin, tau

import rerun as rr

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

# Set up plot styling:
# They are logged as static as they don't change over time and apply to
# all timelines.
# Log two lines series under a shared root so that they show in the same
# plot by default.
rr.log(
    "trig/sin",
    rr.SeriesLines(colors=[255, 0, 0], names="sin(0.01t)", widths=2),
    static=True,
)
rr.log(
    "trig/cos",
    rr.SeriesLines(colors=[0, 255, 0], names="cos(0.01t)", widths=4),
    static=True,
)

# Log the data on a timeline called "step".
for t in range(int(tau * 2 * 100.0)):
    rr.set_time("step", sequence=t)

    rr.log("trig/sin", rr.Scalars(sin(float(t) / 100.0)))
    rr.log("trig/cos", rr.Scalars(cos(float(t) / 100.0)))
```

<picture data-inline-viewer="snippets/archetypes/series_lines_style">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/series_line_style/d2616d98b1e46bdb85849b8669154fdf058e3453/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/series_line_style/d2616d98b1e46bdb85849b8669154fdf058e3453/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/series_line_style/d2616d98b1e46bdb85849b8669154fdf058e3453/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/series_line_style/d2616d98b1e46bdb85849b8669154fdf058e3453/1200w.png">
  <img src="https://static.rerun.io/series_line_style/d2616d98b1e46bdb85849b8669154fdf058e3453/full.png">
</picture>

