From 50b73e94cd78bbefac52397fc4a9ebeac38b0197 Mon Sep 17 00:00:00 2001 From: Marcelo Schmitt Date: Wed, 22 May 2024 16:29:02 -0300 Subject: [PATCH] examples: ad4020_example: Display current device name in plot titles Print the name of the current ADC device in plot titles. Signed-off-by: Marcelo Schmitt --- examples/ad4020_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ad4020_example.py b/examples/ad4020_example.py index 0b8dfc642..73cd8f40f 100644 --- a/examples/ad4020_example.py +++ b/examples/ad4020_example.py @@ -32,7 +32,7 @@ plt.figure(1) plt.clf() -plt.title("AD4020 Time Domain Data") +plt.title(dev_name.upper() + " Time Domain Data") plt.plot(x, voltage) plt.xlabel("Data Point") plt.ylabel("Voltage (V)") @@ -45,7 +45,7 @@ plt.figure(2) plt.clf() -plt.title("AD4020 Spectrum (Volts absolute)") +plt.title(dev_name.upper() + " Spectrum (Volts absolute)") plt.semilogy(f, Pxx_abs) plt.ylim([1e-6, 4]) plt.xlabel("frequency [Hz]")