Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::SeriesPoint Struct Reference

Archetype: Define the style properties for a point series in a chart. More...

#include <rerun/archetypes/series_point.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 SeriesPoint (SeriesPoint &&other)=default
 
 SeriesPoint (const SeriesPoint &other)=default
 
SeriesPointoperator= (const SeriesPoint &other)=default
 
SeriesPointoperator= (SeriesPoint &&other)=default
 
SeriesPoint with_color (const rerun::components::Color &_color) &&
 Color for the corresponding series.
 
SeriesPoint with_many_color (const Collection< rerun::components::Color > &_color) &&
 This method makes it possible to pack multiple color in a single component batch.
 
SeriesPoint with_marker (const rerun::components::MarkerShape &_marker) &&
 What shape to use to represent the point.
 
SeriesPoint with_many_marker (const Collection< rerun::components::MarkerShape > &_marker) &&
 This method makes it possible to pack multiple marker in a single component batch.
 
SeriesPoint with_name (const rerun::components::Name &_name) &&
 Display name of the series.
 
SeriesPoint with_many_name (const Collection< rerun::components::Name > &_name) &&
 This method makes it possible to pack multiple name in a single component batch.
 
SeriesPoint with_visible_series (const Collection< rerun::components::SeriesVisible > &_visible_series) &&
 Which point series are visible.
 
SeriesPoint with_marker_size (const rerun::components::MarkerSize &_marker_size) &&
 Size of the marker.
 
SeriesPoint with_many_marker_size (const Collection< rerun::components::MarkerSize > &_marker_size) &&
 This method makes it possible to pack multiple marker_size in a single component batch.
 
Collection< ComponentColumncolumns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumncolumns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static SeriesPoint update_fields ()
 Update only some specific fields of a SeriesPoint.
 
static SeriesPoint clear_fields ()
 Clear all the fields of a SeriesPoint.
 

Public Attributes

std::optional< ComponentBatchcolor
 Color for the corresponding series.
 
std::optional< ComponentBatchmarker
 What shape to use to represent the point.
 
std::optional< ComponentBatchname
 Display name of the series.
 
std::optional< ComponentBatchvisible_series
 Which point series are visible.
 
std::optional< ComponentBatchmarker_size
 Size of the marker.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 
static constexpr const char ArchetypeName [] = "rerun.archetypes.SeriesPoint"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_color
 ComponentDescriptor for the color field.
 
static constexpr auto Descriptor_marker
 ComponentDescriptor for the marker field.
 
static constexpr auto Descriptor_name
 ComponentDescriptor for the name field.
 
static constexpr auto Descriptor_visible_series
 ComponentDescriptor for the visible_series field.
 
static constexpr auto Descriptor_marker_size
 ComponentDescriptor for the marker_size field.
 

Detailed Description

Archetype: Define the style properties for a point series in a chart.

This archetype only provides styling information and should be logged as static when possible. The underlying data needs to be logged to the same entity-path using archetypes::Scalars.

Example

Point series

image

#include <rerun.hpp>
#include <cmath>
constexpr float TAU = 6.28318530717958647692528676655900577f;
int main() {
const auto rec = rerun::RecordingStream("rerun_example_series_point_style");
rec.spawn().exit_on_failure();
// Set up plot styling:
// They are logged static as they don't change over time and apply to all timelines.
// Log two point series under a shared root so that they show in the same plot by default.
rec.log_static(
"trig/sin",
.with_colors(rerun::Rgba32{255, 0, 0})
.with_names("sin(0.01t)")
.with_marker_sizes(4.0f)
);
rec.log_static(
"trig/cos",
.with_colors(rerun::Rgba32{0, 255, 0})
.with_names("cos(0.01t)")
.with_marker_sizes(2.0f)
);
// Log the data on a timeline called "step".
for (int t = 0; t <static_cast<int>(TAU * 2.0 * 10.0); ++t) {
rec.set_time_sequence("step", t);
rec.log("trig/sin", rerun::Scalars(sin(static_cast<double>(t) / 10.0)));
rec.log("trig/cos", rerun::Scalars(cos(static_cast<double>(t) / 10.0)));
}
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
Archetype: One or more double-precision scalar values, e.g.
Definition scalars.hpp:81
Archetype: Define the style properties for one or more point series (scatter plot) in a chart.
Definition series_points.hpp:77
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition rgba32.hpp:28

Deprecated since 0.23.0: Use SeriesPoints instead.

Member Function Documentation

◆ with_many_color()

SeriesPoint rerun::archetypes::SeriesPoint::with_many_color ( const Collection< rerun::components::Color > &  _color) &&
inline

This method makes it possible to pack multiple color in a single component batch.

This only makes sense when used in conjunction with columns. with_color should be used when logging a single row's worth of data.

◆ with_many_marker()

SeriesPoint rerun::archetypes::SeriesPoint::with_many_marker ( const Collection< rerun::components::MarkerShape > &  _marker) &&
inline

This method makes it possible to pack multiple marker in a single component batch.

This only makes sense when used in conjunction with columns. with_marker should be used when logging a single row's worth of data.

◆ with_name()

SeriesPoint rerun::archetypes::SeriesPoint::with_name ( const rerun::components::Name _name) &&
inline

Display name of the series.

Used in the legend.

◆ with_many_name()

SeriesPoint rerun::archetypes::SeriesPoint::with_many_name ( const Collection< rerun::components::Name > &  _name) &&
inline

This method makes it possible to pack multiple name in a single component batch.

This only makes sense when used in conjunction with columns. with_name should be used when logging a single row's worth of data.

◆ with_visible_series()

SeriesPoint rerun::archetypes::SeriesPoint::with_visible_series ( const Collection< rerun::components::SeriesVisible > &  _visible_series) &&
inline

Which point series are visible.

If not set, all point series on this entity are visible. Unlike with the regular visibility property of the entire entity, any series that is hidden via this property will still be visible in the legend.

◆ with_many_marker_size()

SeriesPoint rerun::archetypes::SeriesPoint::with_many_marker_size ( const Collection< rerun::components::MarkerSize > &  _marker_size) &&
inline

This method makes it possible to pack multiple marker_size in a single component batch.

This only makes sense when used in conjunction with columns. with_marker_size should be used when logging a single row's worth of data.

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::SeriesPoint::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.

This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.

The specified lengths must sum to the total length of the component batch.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::archetypes::SeriesPoint::columns ( )

Partitions the component data into unit-length sub-batches.

This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.

Member Data Documentation

◆ name

std::optional<ComponentBatch> rerun::archetypes::SeriesPoint::name

Display name of the series.

Used in the legend.

◆ visible_series

std::optional<ComponentBatch> rerun::archetypes::SeriesPoint::visible_series

Which point series are visible.

If not set, all point series on this entity are visible. Unlike with the regular visibility property of the entire entity, any series that is hidden via this property will still be visible in the legend.

◆ IndicatorComponentName

constexpr const char rerun::archetypes::SeriesPoint::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.components.SeriesPointIndicator"

◆ Descriptor_color

constexpr auto rerun::archetypes::SeriesPoint::Descriptor_color
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "color", Loggable<rerun::components::Color>::Descriptor.component_name
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition series_point.hpp:110

ComponentDescriptor for the color field.

◆ Descriptor_marker

constexpr auto rerun::archetypes::SeriesPoint::Descriptor_marker
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "marker",
Loggable<rerun::components::MarkerShape>::Descriptor.component_name
)

ComponentDescriptor for the marker field.

◆ Descriptor_name

constexpr auto rerun::archetypes::SeriesPoint::Descriptor_name
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "name", Loggable<rerun::components::Name>::Descriptor.component_name
)

ComponentDescriptor for the name field.

◆ Descriptor_visible_series

constexpr auto rerun::archetypes::SeriesPoint::Descriptor_visible_series
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "visible_series",
Loggable<rerun::components::SeriesVisible>::Descriptor.component_name
)

ComponentDescriptor for the visible_series field.

◆ Descriptor_marker_size

constexpr auto rerun::archetypes::SeriesPoint::Descriptor_marker_size
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "marker_size",
Loggable<rerun::components::MarkerSize>::Descriptor.component_name
)

ComponentDescriptor for the marker_size field.


The documentation for this struct was generated from the following file: