Data Cursors on Line Plot With Spectrogram Subplot
Show older comments
There seems to be a bug in the behavior of data cursors when both a line plot and spectrogram plot are used in the same figure window.
After creating a subplot containing a spectrogram, the data cursors for the line plot will show the x value, a time value, and the colorbar value.
clear
close all
clc
fs = 10e9;
t = (0:1/fs:250e-9);
y = sin(2*pi*500e6*t + 20*cos(2*pi*10e6*t));
subplot(2,1,1)
plot(t,y)
subplot(2,1,2)
spectrogram(y,128,64,128,fs)
I believe this bug also applies to all versions that use the new figure window styles.
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!