MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / Demo_NaNValues

Function Demo_NaNValues

Source/3rdParty/implot/implot_demo.cpp:1117–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115//-----------------------------------------------------------------------------
1116
1117void Demo_NaNValues() {
1118 IMGUI_DEMO_MARKER("Plots/NaN Values");
1119
1120 static bool include_nan = true;
1121 static ImPlotLineFlags flags = 0;
1122
1123 float data1[5] = {0.0f,0.25f,0.5f,0.75f,1.0f};
1124 float data2[5] = {0.0f,0.25f,0.5f,0.75f,1.0f};
1125
1126 if (include_nan)
1127 data1[2] = NAN;
1128
1129 ImGui::Checkbox("Include NaN",&include_nan);
1130 ImGui::SameLine();
1131 ImGui::CheckboxFlags("Skip NaN", (unsigned int*)&flags, ImPlotLineFlags_SkipNaN);
1132
1133 if (ImPlot::BeginPlot("##NaNValues")) {
1134 ImPlot::PlotLine("line", data1, data2, 5, {
1135 ImPlotProp_Flags, flags,
1136 ImPlotProp_Marker, ImPlotMarker_Square
1137 });
1138 ImPlot::PlotBars("bars", data1, 5);
1139 ImPlot::EndPlot();
1140 }
1141}
1142
1143//-----------------------------------------------------------------------------
1144

Callers

nothing calls this directly

Calls 5

CheckboxFunction · 0.85
BeginPlotFunction · 0.85
PlotLineFunction · 0.85
PlotBarsFunction · 0.85
EndPlotFunction · 0.85

Tested by

no test coverage detected