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

Function Demo_CustomScale

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

Source from the content-addressed store, hash-verified

1562}
1563
1564void Demo_CustomScale() {
1565 IMGUI_DEMO_MARKER("Axes/Custom Scale");
1566 static float v[100];
1567 for (int i = 0; i < 100; ++i) {
1568 v[i] = i*0.01f;
1569 }
1570 if (ImPlot::BeginPlot("Sqrt")) {
1571 ImPlot::SetupAxis(ImAxis_X1, "Linear");
1572 ImPlot::SetupAxis(ImAxis_Y1, "Sqrt");
1573 ImPlot::SetupAxisScale(ImAxis_Y1, TransformForward_Sqrt, TransformInverse_Sqrt);
1574 ImPlot::SetupAxisLimitsConstraints(ImAxis_Y1, 0, INFINITY);
1575 ImPlot::PlotLine("##data",v,v,100);
1576 ImPlot::EndPlot();
1577 }
1578}
1579
1580//-----------------------------------------------------------------------------
1581

Callers

nothing calls this directly

Calls 6

BeginPlotFunction · 0.85
SetupAxisFunction · 0.85
SetupAxisScaleFunction · 0.85
PlotLineFunction · 0.85
EndPlotFunction · 0.85

Tested by

no test coverage detected