From 7190d53a6a758e9709b9c9b6b3fda2995369f664 Mon Sep 17 00:00:00 2001 From: R-Abbasi Date: Mon, 13 Nov 2023 22:34:19 +0330 Subject: [PATCH] Set axes x and y as Seconds and Volts respectively with specific values/ticks --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b8abbd4b..dd4f891b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -803,7 +803,11 @@ int main() else { xmax_paused = x_max; - ImPlot::SetupAxes("x [Datenpunkte]", "y [ADC Wert]"); + ImPlot::SetupAxes("x [Seconds]", "y [Volts]"); + // x and y axes ranges: [0, 10], [-10, 200] + ImPlot::SetupAxesLimits(0, 10, -10, 200); + // make specific values/ticks on Y-axis + ImPlot::SetupAxisTicks(ImAxis_Y1, -10, 200, 22, nullptr, true); } });