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 with_color (rerun::components::Color _color) &&
 Color for the corresponding series.
 
SeriesPoint with_marker (rerun::components::MarkerShape _marker) &&
 What shape to use to represent the point.
 
SeriesPoint with_name (rerun::components::Name _name) &&
 Display name of the series.
 
SeriesPoint with_marker_size (rerun::components::MarkerSize _marker_size) &&
 Size of the marker.
 
size_t num_instances () const
 Returns the number of primary instances of this archetype.
 

Public Attributes

std::optional< rerun::components::Colorcolor
 Color for the corresponding series.
 
std::optional< rerun::components::MarkerShapemarker
 What shape to use to represent the point.
 
std::optional< rerun::components::Namename
 Display name of the series.
 
std::optional< rerun::components::MarkerSizemarker_size
 Size of the marker.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

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 timeless when possible. The underlying data needs to be logged to the same entity-path using the Scalar archetype.

See rerun::archetypes::Scalar

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 timeless 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_timeless(
"trig/sin",
.with_color({255, 0, 0})
.with_name("sin(0.01t)")
.with_marker(rerun::components::MarkerShape::Circle)
);
rec.log_timeless(
"trig/cos",
.with_color({0, 255, 0})
.with_name("cos(0.01t)")
.with_marker(rerun::components::MarkerShape::Cross)
);
// 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::Scalar(sin(static_cast<double>(t) / 10.0)));
rec.log("trig/cos", rerun::Scalar(cos(static_cast<double>(t) / 10.0f)));
}
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:57
Archetype: Log a double-precision scalar.
Definition scalar.hpp:50
Archetype: Define the style properties for a point series in a chart.
Definition series_point.hpp:75
SeriesPoint with_marker_size(rerun::components::MarkerSize _marker_size) &&
Size of the marker.
Definition series_point.hpp:125
SeriesPoint with_marker(rerun::components::MarkerShape _marker) &&
What shape to use to represent the point.
Definition series_point.hpp:109
SeriesPoint with_name(rerun::components::Name _name) &&
Display name of the series.
Definition series_point.hpp:118
SeriesPoint with_color(rerun::components::Color _color) &&
Color for the corresponding series.
Definition series_point.hpp:102

Member Function Documentation

◆ with_name()

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

Display name of the series.

Used in the legend.

Member Data Documentation

◆ name

std::optional<rerun::components::Name> rerun::archetypes::SeriesPoint::name

Display name of the series.

Used in the legend.

◆ IndicatorComponentName

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

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