special data tip in matlab
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Legend 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!