![]() |
0.4.1
|
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. | |
Specifying the look of a certain line in the plot.
Definition at line 29 of file PlotItemStyle.hpp.
|
strong |
Possible line types.
Enumerator | |
---|---|
Scatter | Scatter plot (only markers) |
Line | Line plot. |
Definition at line 32 of file PlotItemStyle.hpp.
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.
[in] | plotName | Plot name |
[in] | xData | Data on the x axis |
[in] | yData | Data on the y axis |
[in] | plotElementIdx | Plot element index |
[in] | defaultStride | Default stride size |
[in] | plotLineFlags | LineFlags from a parent plot |
[in] | colormapMaskColors | Buffer for the colormap mask of line plots |
[in] | markerColormapMaskColors | Buffer for the colormap mask of the markers |
[in] | yErrorData | Lower and upper data for error bounds |
Definition at line 536 of file PlotItemStyle.cpp.
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.
[in] | id | Unique id for the popup (should not change while open) |
[in] | displayTitle | Display title |
[in] | plotDataBufferSize | Buffer size of the data |
[in] | plotElementIdx | Plot element index |
[in] | nameId | Name and id of the calling node (logging) |
[in] | plotLineFlags | LineFlags from a parent plot |
[in,out] | colormapMaskColors | Buffer for the colormap mask of line plots |
[in,out] | markerColormapMaskColors | Buffer for the colormap mask of the markers |
[in] | ShowDataReferenceChooser | Function to call to show a Combo to select the data reference |
[in,out] | eventMarker | Buffer for event markers |
[in,out] | eventTooltips | List of tooltips (x,y, tooltip) |
Definition at line 95 of file PlotItemStyle.cpp.
ImVec4 NAV::PlotItemStyle::color |
Line Color.
Definition at line 45 of file PlotItemStyle.hpp.
std::pair<ColormapMaskType, int64_t> NAV::PlotItemStyle::colormapMask |
Colormap mask (pair: type and id)
Definition at line 47 of file PlotItemStyle.hpp.
size_t NAV::PlotItemStyle::colormapMaskDataCmpIdx |
Index of the plot data to compare for the color.
Definition at line 49 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::errorBoundsAlpha |
Alpha value for the error bounds.
Definition at line 80 of file PlotItemStyle.hpp.
size_t NAV::PlotItemStyle::errorBoundsDataIdx |
Index of the plot data to use for error bounds.
Definition at line 78 of file PlotItemStyle.hpp.
bool NAV::PlotItemStyle::errorBoundsEnabled |
Wether to plot the error bounds.
Definition at line 76 of file PlotItemStyle.hpp.
std::string NAV::PlotItemStyle::errorBoundsModifierExpression |
Expression to modify the error bounds with.
Definition at line 82 of file PlotItemStyle.hpp.
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.
ImVec4 NAV::PlotItemStyle::eventMarkerFillColor |
Fill color for markers.
Definition at line 95 of file PlotItemStyle.hpp.
ImVec4 NAV::PlotItemStyle::eventMarkerOutlineColor |
Outline/Border color for markers.
Definition at line 97 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::eventMarkerSize |
Size of the markers (makes the marker smaller/bigger)
Definition at line 91 of file PlotItemStyle.hpp.
ImPlotMarker NAV::PlotItemStyle::eventMarkerStyle |
Style of the marker to display.
Definition at line 89 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::eventMarkerWeight |
Weight of the markers (increases thickness of marker lines)
Definition at line 93 of file PlotItemStyle.hpp.
bool NAV::PlotItemStyle::eventsEnabled |
Show events on this data.
Definition at line 87 of file PlotItemStyle.hpp.
std::string NAV::PlotItemStyle::eventTooltipFilterRegex |
Tooltip search regex.
Definition at line 99 of file PlotItemStyle.hpp.
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.
std::string NAV::PlotItemStyle::legendNameGui |
Legend name which gets changed in the gui.
Definition at line 41 of file PlotItemStyle.hpp.
std::optional<ImPlotLineFlags> NAV::PlotItemStyle::lineFlags |
Line Flags (overrides the plot selection)
Definition at line 53 of file PlotItemStyle.hpp.
LineType NAV::PlotItemStyle::lineType |
Line type.
Definition at line 43 of file PlotItemStyle.hpp.
std::pair<ColormapMaskType, int64_t> NAV::PlotItemStyle::markerColormapMask |
Colormap mask (pair: type and id)
Definition at line 59 of file PlotItemStyle.hpp.
size_t NAV::PlotItemStyle::markerColormapMaskDataCmpIdx |
Index of the plot data to compare for the color.
Definition at line 61 of file PlotItemStyle.hpp.
ImVec4 NAV::PlotItemStyle::markerFillColor |
Fill color for markers.
Definition at line 71 of file PlotItemStyle.hpp.
ImVec4 NAV::PlotItemStyle::markerOutlineColor |
Outline/Border color for markers.
Definition at line 73 of file PlotItemStyle.hpp.
bool NAV::PlotItemStyle::markers |
Display markers for the line plot (no effect for scatter type)
Definition at line 63 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::markerSize |
Size of the markers (makes the marker smaller/bigger)
Definition at line 67 of file PlotItemStyle.hpp.
ImPlotMarker NAV::PlotItemStyle::markerStyle |
Style of the marker to display.
Definition at line 65 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::markerWeight |
Weight of the markers (increases thickness of marker lines)
Definition at line 69 of file PlotItemStyle.hpp.
int NAV::PlotItemStyle::stride |
Amount of points to skip for plotting.
Definition at line 56 of file PlotItemStyle.hpp.
float NAV::PlotItemStyle::thickness |
Line thickness.
Definition at line 51 of file PlotItemStyle.hpp.