special data tip in matlab

조회 수: 1 (최근 30일)
fima v
fima v 2022년 11월 17일
Hello i have a figure with multiple plots i want to make a data tip line as shown bellow.
so the points of intersectionof the red line with the plots will be the location of the data tips
and such data tip say what legent the red line crossed and the X,Y values of the intersection point?
is it possible ? because if we have 40 plots the 40 colors they all look the same . such "red line" could help see the legend of the plot so we want be confused
x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 100*exp(-0.5*x).*sin(10*x);
figure;
hold on
plot(x,y1)
plot(x,y2)
hold off
legend('data1','data2')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by