0.4.1
Loading...
Searching...
No Matches
NAV::PlotItemStyle Struct Reference

Specifying the look of a certain line in the plot. More...

Data Structures

struct  LegendPopupReturn
 Legend popup return type. More...
 

Public Types

enum class  LineType : uint8_t {
  Scatter ,
  Line
}
 Possible line types. More...
 

Public Member Functions

void plotData (const char *plotName, const ScrollingBuffer< double > &xData, const ScrollingBuffer< double > &yData, int plotElementIdx, int defaultStride=1, ImPlotLineFlags plotLineFlags=ImPlotLineFlags_NoClip|ImPlotLineFlags_SkipNaN, ScrollingBuffer< ImU32 > *colormapMaskColors=nullptr, ScrollingBuffer< ImU32 > *markerColormapMaskColors=nullptr, const std::array< ScrollingBuffer< double >, 2 > *yErrorData=nullptr) const
 Plots the data with the style.
 
LegendPopupReturn showLegendPopup (const char *id, const char *displayTitle, int plotDataBufferSize, int plotElementIdx, const char *nameId, ImPlotLineFlags plotLineFlags=ImPlotLineFlags_NoClip|ImPlotLineFlags_SkipNaN, ScrollingBuffer< ImU32 > *colormapMaskColors=nullptr, ScrollingBuffer< ImU32 > *markerColormapMaskColors=nullptr, const std::function< bool(size_t &, const char *)> &ShowDataReferenceChooser=nullptr, ScrollingBuffer< double > *eventMarker=nullptr, std::vector< std::tuple< double, double, PlotEventTooltip > > *eventTooltips=nullptr)
 Shows a legend popup for plot items.
 

Data Fields

ImVec4 color
 Line Color.
 
std::pair< ColormapMaskType, int64_t > colormapMask
 Colormap mask (pair: type and id)
 
size_t colormapMaskDataCmpIdx
 Index of the plot data to compare for the color.
 
float errorBoundsAlpha
 Alpha value for the error bounds.
 
size_t errorBoundsDataIdx
 Index of the plot data to use for error bounds.
 
bool errorBoundsEnabled
 Wether to plot the error bounds.
 
std::string errorBoundsModifierExpression
 Expression to modify the error bounds with.
 
std::string errorBoundsModifierExpressionTemp
 Expression to modify the error bounds with (temporary GUI variable, till it is a valid expression)
 
ImVec4 eventMarkerFillColor
 Fill color for markers.
 
ImVec4 eventMarkerOutlineColor
 Outline/Border color for markers.
 
float eventMarkerSize
 Size of the markers (makes the marker smaller/bigger)
 
ImPlotMarker eventMarkerStyle
 Style of the marker to display.
 
float eventMarkerWeight
 Weight of the markers (increases thickness of marker lines)
 
bool eventsEnabled
 Show events on this data.
 
std::string eventTooltipFilterRegex
 Tooltip search regex.
 
std::string legendName
 Display name in the legend (if not set falls back to PlotData::displayName)
 
std::string legendNameGui
 Legend name which gets changed in the gui.
 
std::optional< ImPlotLineFlags > lineFlags
 Line Flags (overrides the plot selection)
 
LineType lineType
 Line type.
 
std::pair< ColormapMaskType, int64_t > markerColormapMask
 Colormap mask (pair: type and id)
 
size_t markerColormapMaskDataCmpIdx
 Index of the plot data to compare for the color.
 
ImVec4 markerFillColor
 Fill color for markers.
 
ImVec4 markerOutlineColor
 Outline/Border color for markers.
 
bool markers
 Display markers for the line plot (no effect for scatter type)
 
float markerSize
 Size of the markers (makes the marker smaller/bigger)
 
ImPlotMarker markerStyle
 Style of the marker to display.
 
float markerWeight
 Weight of the markers (increases thickness of marker lines)
 
int stride
 Amount of points to skip for plotting.
 
float thickness
 Line thickness.
 

Detailed Description

Specifying the look of a certain line in the plot.

Definition at line 29 of file PlotItemStyle.hpp.

Member Enumeration Documentation

◆ LineType

enum class NAV::PlotItemStyle::LineType : uint8_t
strong

Possible line types.

Enumerator
Scatter 

Scatter plot (only markers)

Line 

Line plot.

Definition at line 32 of file PlotItemStyle.hpp.

Member Function Documentation

◆ plotData()

void NAV::PlotItemStyle::plotData ( const char * plotName,
const ScrollingBuffer< double > & xData,
const ScrollingBuffer< double > & yData,
int plotElementIdx,
int defaultStride = 1,
ImPlotLineFlags plotLineFlags = ImPlotLineFlags_NoClip | ImPlotLineFlags_SkipNaN,
ScrollingBuffer< ImU32 > * colormapMaskColors = nullptr,
ScrollingBuffer< ImU32 > * markerColormapMaskColors = nullptr,
const std::array< ScrollingBuffer< double >, 2 > * yErrorData = nullptr ) const

Plots the data with the style.

Parameters
[in]plotNamePlot name
[in]xDataData on the x axis
[in]yDataData on the y axis
[in]plotElementIdxPlot element index
[in]defaultStrideDefault stride size
[in]plotLineFlagsLineFlags from a parent plot
[in]colormapMaskColorsBuffer for the colormap mask of line plots
[in]markerColormapMaskColorsBuffer for the colormap mask of the markers
[in]yErrorDataLower and upper data for error bounds

Definition at line 536 of file PlotItemStyle.cpp.

◆ showLegendPopup()

PlotItemStyle::LegendPopupReturn NAV::PlotItemStyle::showLegendPopup ( const char * id,
const char * displayTitle,
int plotDataBufferSize,
int plotElementIdx,
const char * nameId,
ImPlotLineFlags plotLineFlags = ImPlotLineFlags_NoClip | ImPlotLineFlags_SkipNaN,
ScrollingBuffer< ImU32 > * colormapMaskColors = nullptr,
ScrollingBuffer< ImU32 > * markerColormapMaskColors = nullptr,
const std::function< bool(size_t &, const char *)> & ShowDataReferenceChooser = nullptr,
ScrollingBuffer< double > * eventMarker = nullptr,
std::vector< std::tuple< double, double, PlotEventTooltip > > * eventTooltips = nullptr )

Shows a legend popup for plot items.

Parameters
[in]idUnique id for the popup (should not change while open)
[in]displayTitleDisplay title
[in]plotDataBufferSizeBuffer size of the data
[in]plotElementIdxPlot element index
[in]nameIdName and id of the calling node (logging)
[in]plotLineFlagsLineFlags from a parent plot
[in,out]colormapMaskColorsBuffer for the colormap mask of line plots
[in,out]markerColormapMaskColorsBuffer for the colormap mask of the markers
[in]ShowDataReferenceChooserFunction to call to show a Combo to select the data reference
[in,out]eventMarkerBuffer for event markers
[in,out]eventTooltipsList of tooltips (x,y, tooltip)
Returns
True if a change was made

Definition at line 95 of file PlotItemStyle.cpp.

Field Documentation

◆ color

ImVec4 NAV::PlotItemStyle::color

Line Color.

Definition at line 45 of file PlotItemStyle.hpp.

◆ colormapMask

std::pair<ColormapMaskType, int64_t> NAV::PlotItemStyle::colormapMask

Colormap mask (pair: type and id)

Definition at line 47 of file PlotItemStyle.hpp.

◆ colormapMaskDataCmpIdx

size_t NAV::PlotItemStyle::colormapMaskDataCmpIdx

Index of the plot data to compare for the color.

Definition at line 49 of file PlotItemStyle.hpp.

◆ errorBoundsAlpha

float NAV::PlotItemStyle::errorBoundsAlpha

Alpha value for the error bounds.

Definition at line 80 of file PlotItemStyle.hpp.

◆ errorBoundsDataIdx

size_t NAV::PlotItemStyle::errorBoundsDataIdx

Index of the plot data to use for error bounds.

Definition at line 78 of file PlotItemStyle.hpp.

◆ errorBoundsEnabled

bool NAV::PlotItemStyle::errorBoundsEnabled

Wether to plot the error bounds.

Definition at line 76 of file PlotItemStyle.hpp.

◆ errorBoundsModifierExpression

std::string NAV::PlotItemStyle::errorBoundsModifierExpression

Expression to modify the error bounds with.

Definition at line 82 of file PlotItemStyle.hpp.

◆ errorBoundsModifierExpressionTemp

std::string NAV::PlotItemStyle::errorBoundsModifierExpressionTemp

Expression to modify the error bounds with (temporary GUI variable, till it is a valid expression)

Definition at line 84 of file PlotItemStyle.hpp.

◆ eventMarkerFillColor

ImVec4 NAV::PlotItemStyle::eventMarkerFillColor

Fill color for markers.

Definition at line 95 of file PlotItemStyle.hpp.

◆ eventMarkerOutlineColor

ImVec4 NAV::PlotItemStyle::eventMarkerOutlineColor

Outline/Border color for markers.

Definition at line 97 of file PlotItemStyle.hpp.

◆ eventMarkerSize

float NAV::PlotItemStyle::eventMarkerSize

Size of the markers (makes the marker smaller/bigger)

Definition at line 91 of file PlotItemStyle.hpp.

◆ eventMarkerStyle

ImPlotMarker NAV::PlotItemStyle::eventMarkerStyle

Style of the marker to display.

Definition at line 89 of file PlotItemStyle.hpp.

◆ eventMarkerWeight

float NAV::PlotItemStyle::eventMarkerWeight

Weight of the markers (increases thickness of marker lines)

Definition at line 93 of file PlotItemStyle.hpp.

◆ eventsEnabled

bool NAV::PlotItemStyle::eventsEnabled

Show events on this data.

Definition at line 87 of file PlotItemStyle.hpp.

◆ eventTooltipFilterRegex

std::string NAV::PlotItemStyle::eventTooltipFilterRegex

Tooltip search regex.

Definition at line 99 of file PlotItemStyle.hpp.

◆ legendName

std::string NAV::PlotItemStyle::legendName

Display name in the legend (if not set falls back to PlotData::displayName)

Definition at line 39 of file PlotItemStyle.hpp.

◆ legendNameGui

std::string NAV::PlotItemStyle::legendNameGui

Legend name which gets changed in the gui.

Definition at line 41 of file PlotItemStyle.hpp.

◆ lineFlags

std::optional<ImPlotLineFlags> NAV::PlotItemStyle::lineFlags

Line Flags (overrides the plot selection)

Definition at line 53 of file PlotItemStyle.hpp.

◆ lineType

LineType NAV::PlotItemStyle::lineType

Line type.

Definition at line 43 of file PlotItemStyle.hpp.

◆ markerColormapMask

std::pair<ColormapMaskType, int64_t> NAV::PlotItemStyle::markerColormapMask

Colormap mask (pair: type and id)

Definition at line 59 of file PlotItemStyle.hpp.

◆ markerColormapMaskDataCmpIdx

size_t NAV::PlotItemStyle::markerColormapMaskDataCmpIdx

Index of the plot data to compare for the color.

Definition at line 61 of file PlotItemStyle.hpp.

◆ markerFillColor

ImVec4 NAV::PlotItemStyle::markerFillColor

Fill color for markers.

Definition at line 71 of file PlotItemStyle.hpp.

◆ markerOutlineColor

ImVec4 NAV::PlotItemStyle::markerOutlineColor

Outline/Border color for markers.

Definition at line 73 of file PlotItemStyle.hpp.

◆ markers

bool NAV::PlotItemStyle::markers

Display markers for the line plot (no effect for scatter type)

Definition at line 63 of file PlotItemStyle.hpp.

◆ markerSize

float NAV::PlotItemStyle::markerSize

Size of the markers (makes the marker smaller/bigger)

Definition at line 67 of file PlotItemStyle.hpp.

◆ markerStyle

ImPlotMarker NAV::PlotItemStyle::markerStyle

Style of the marker to display.

Definition at line 65 of file PlotItemStyle.hpp.

◆ markerWeight

float NAV::PlotItemStyle::markerWeight

Weight of the markers (increases thickness of marker lines)

Definition at line 69 of file PlotItemStyle.hpp.

◆ stride

int NAV::PlotItemStyle::stride

Amount of points to skip for plotting.

Definition at line 56 of file PlotItemStyle.hpp.

◆ thickness

float NAV::PlotItemStyle::thickness

Line thickness.

Definition at line 51 of file PlotItemStyle.hpp.


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