MCPcopy Create free account
hub / github.com/SatDump/SatDump / SetupAxisFormat

Function SetupAxisFormat

src-core/imgui/implot/implot.cpp:2159–2169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157}
2158
2159void SetupAxisFormat(ImAxis idx, const char* fmt) {
2160 ImPlotContext& gp = *GImPlot;
2161 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
2162 "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
2163 ImPlotPlot& plot = *gp.CurrentPlot;
2164 ImPlotAxis& axis = plot.Axes[idx];
2165 IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
2166 axis.HasFormatSpec = fmt != nullptr;
2167 if (fmt != nullptr)
2168 ImStrncpy(axis.FormatSpec,fmt,sizeof(axis.FormatSpec));
2169}
2170
2171void SetupAxisLinks(ImAxis idx, double* min_lnk, double* max_lnk) {
2172 ImPlotContext& gp = *GImPlot;

Callers 2

Demo_TickLabelsFunction · 0.85

Calls 1

ImStrncpyFunction · 0.85

Tested by

no test coverage detected