MCPcopy Create free account
hub / github.com/ShenCiao/CialloResearch / SetupAxisFormat

Function SetupAxisFormat

imgui/implot.cpp:2115–2124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2113}
2114
2115void SetupAxisFormat(ImAxis idx, const char* fmt) {
2116 IM_ASSERT_USER_ERROR(GImPlot->CurrentPlot != NULL && !GImPlot->CurrentPlot->SetupLocked,
2117 "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
2118 ImPlotPlot& plot = *GImPlot->CurrentPlot;
2119 ImPlotAxis& axis = plot.Axes[idx];
2120 IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
2121 axis.HasFormatSpec = fmt != NULL;
2122 if (fmt != NULL)
2123 ImStrncpy(axis.FormatSpec,fmt,sizeof(axis.FormatSpec));
2124}
2125
2126void SetupAxisLinks(ImAxis idx, double* min_lnk, double* max_lnk) {
2127 IM_ASSERT_USER_ERROR(GImPlot->CurrentPlot != NULL && !GImPlot->CurrentPlot->SetupLocked,

Callers 2

Demo_TickLabelsFunction · 0.85

Calls 1

ImStrncpyFunction · 0.85

Tested by

no test coverage detected