| 1834 | //----------------------------------------------------------------------------- |
| 1835 | |
| 1836 | void 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 |
nothing calls this directly
no test coverage detected