| 2113 | } |
| 2114 | |
| 2115 | void 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 | |
| 2126 | void SetupAxisLinks(ImAxis idx, double* min_lnk, double* max_lnk) { |
| 2127 | IM_ASSERT_USER_ERROR(GImPlot->CurrentPlot != NULL && !GImPlot->CurrentPlot->SetupLocked, |
no test coverage detected