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

Function Demo_SubplotAxisLinking

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

Source from the content-addressed store, hash-verified

1834//-----------------------------------------------------------------------------
1835
1836void Demo_SubplotAxisLinking() {
1837 IMGUI_DEMO_MARKER("Subplots/Axis Linking");
1838 static ImPlotSubplotFlags flags = ImPlotSubplotFlags_LinkRows | ImPlotSubplotFlags_LinkCols;
1839 ImGui::CheckboxFlags("ImPlotSubplotFlags_LinkRows", (unsigned int*)&flags, ImPlotSubplotFlags_LinkRows);
1840 ImGui::CheckboxFlags("ImPlotSubplotFlags_LinkCols", (unsigned int*)&flags, ImPlotSubplotFlags_LinkCols);
1841 ImGui::CheckboxFlags("ImPlotSubplotFlags_LinkAllX", (unsigned int*)&flags, ImPlotSubplotFlags_LinkAllX);
1842 ImGui::CheckboxFlags("ImPlotSubplotFlags_LinkAllY", (unsigned int*)&flags, ImPlotSubplotFlags_LinkAllY);
1843
1844 static int rows = 2;
1845 static int cols = 2;
1846 if (ImPlot::BeginSubplots("##AxisLinking", rows, cols, ImVec2(-1,400), flags)) {
1847 for (int i = 0; i < rows*cols; ++i) {
1848 if (ImPlot::BeginPlot("")) {
1849 ImPlot::SetupAxesLimits(0,1000,-1,1);
1850 float fc = 0.01f;
1851 ImPlot::PlotLineG("common",SinewaveGetter,&fc,1000);
1852 ImPlot::EndPlot();
1853 }
1854 }
1855 ImPlot::EndSubplots();
1856 }
1857}
1858
1859//-----------------------------------------------------------------------------
1860

Callers

nothing calls this directly

Calls 7

BeginSubplotsFunction · 0.85
ImVec2Function · 0.85
BeginPlotFunction · 0.85
SetupAxesLimitsFunction · 0.85
PlotLineGFunction · 0.85
EndPlotFunction · 0.85
EndSubplotsFunction · 0.85

Tested by

no test coverage detected