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

Function SetupAxisFormat

Source/3rdParty/implot/implot.cpp:2207–2217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2205}
2206
2207void SetupAxisFormat(ImAxis idx, const char* fmt) {
2208 ImPlotContext& gp = *GImPlot;
2209 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
2210 "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
2211 ImPlotPlot& plot = *gp.CurrentPlot;
2212 ImPlotAxis& axis = plot.Axes[idx];
2213 IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
2214 axis.HasFormatSpec = fmt != nullptr;
2215 if (fmt != nullptr)
2216 ImStrncpy(axis.FormatSpec,fmt,sizeof(axis.FormatSpec));
2217}
2218
2219void SetupAxisLinks(ImAxis idx, double* min_lnk, double* max_lnk) {
2220 ImPlotContext& gp = *GImPlot;

Callers 2

Demo_TickLabelsFunction · 0.85

Calls 1

ImStrncpyFunction · 0.85

Tested by

no test coverage detected