| 2333 | } |
| 2334 | |
| 2335 | void SetupAxisZoomConstraints(ImAxis idx, double z_min, double z_max) { |
| 2336 | ImPlotContext& gp = *GImPlot; |
| 2337 | IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked, |
| 2338 | "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"); |
| 2339 | ImPlotPlot& plot = *gp.CurrentPlot; |
| 2340 | ImPlotAxis& axis = plot.Axes[idx]; |
| 2341 | IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?"); |
| 2342 | axis.ConstraintZoom.Min = z_min; |
| 2343 | axis.ConstraintZoom.Max = z_max; |
| 2344 | } |
| 2345 | |
| 2346 | void SetupAxes(const char* x_label, const char* y_label, ImPlotAxisFlags x_flags, ImPlotAxisFlags y_flags) { |
| 2347 | SetupAxis(ImAxis_X1, x_label, x_flags); |
no outgoing calls
no test coverage detected