Skip to content

Commit 5244f7a

Browse files
committed
examples: Exclude X-axis endpoint from time_data
1 parent f43316d commit 5244f7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/analog_in/voltage_acq_int_clk_plot_wfm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def plot_analog_waveform(waveform, min_start_time=None):
2020
if min_start_time is not None:
2121
time_offset = (waveform.timing.start_time - min_start_time).total_seconds()
2222
duration = waveform.sample_count * waveform.timing.sample_interval.total_seconds()
23-
time_data = np.linspace(time_offset, time_offset + duration, waveform.sample_count)
23+
time_data = np.linspace(
24+
time_offset, time_offset + duration, waveform.sample_count, endpoint=False
25+
)
2426
plot.plot(time_data, waveform.scaled_data, label=waveform.channel_name)
2527

2628

0 commit comments

Comments
 (0)