122 const char* displayTitle,
123 int plotDataBufferSize,
126 ImPlotLineFlags plotLineFlags = ImPlotLineFlags_NoClip | ImPlotLineFlags_SkipNaN,
129 const std::function<
bool(
size_t&,
const char*)>& ShowDataReferenceChooser =
nullptr,
131 std::vector<std::tuple<double, double, PlotEventTooltip>>* eventTooltips =
nullptr);
147 int defaultStride = 1,
148 ImPlotLineFlags plotLineFlags = ImPlotLineFlags_NoClip | ImPlotLineFlags_SkipNaN,
nlohmann::json json
json namespace
Defines how to save certain datatypes to json.
void to_json(json &j, const Node &node)
Converts the provided node into a json object.
@ None
Do not use a colormap mask.
void from_json(const json &j, Node &node)
Converts the provided json object into a node object.
Specifying the look of a certain line in the plot.
float eventMarkerSize
Size of the markers (makes the marker smaller/bigger)
float errorBoundsAlpha
Alpha value for the error bounds.
std::string legendNameGui
Legend name which gets changed in the gui.
float thickness
Line thickness.
ImVec4 eventMarkerFillColor
Fill color for markers.
bool eventsEnabled
Show events on this data.
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.
std::string eventTooltipFilterRegex
Tooltip search regex.
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.
std::optional< ImPlotLineFlags > lineFlags
Line Flags (overrides the plot selection)
float markerSize
Size of the markers (makes the marker smaller/bigger)
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.
size_t markerColormapMaskDataCmpIdx
Index of the plot data to compare for the color.
std::string errorBoundsModifierExpression
Expression to modify the error bounds with.
ImVec4 eventMarkerOutlineColor
Outline/Border color for markers.
LineType
Possible line types.
@ Scatter
Scatter plot (only markers)
ImVec4 markerFillColor
Fill color for markers.
std::string errorBoundsModifierExpressionTemp
Expression to modify the error bounds with (temporary GUI variable, till it is a valid expression)
size_t errorBoundsDataIdx
Index of the plot data to use for error bounds.
float eventMarkerWeight
Weight of the markers (increases thickness of marker lines)
ImPlotMarker eventMarkerStyle
Style of the marker to display.
ImVec4 markerOutlineColor
Outline/Border color for markers.
bool errorBoundsEnabled
Wether to plot the error bounds.
size_t colormapMaskDataCmpIdx
Index of the plot data to compare for the color.
LineType lineType
Line type.
std::pair< ColormapMaskType, int64_t > markerColormapMask
Colormap mask (pair: type and id)
bool markers
Display markers for the line plot (no effect for scatter type)
std::string legendName
Display name in the legend (if not set falls back to PlotData::displayName)
std::pair< ColormapMaskType, int64_t > colormapMask
Colormap mask (pair: type and id)