Show Names of Variables in Plot

Hello,
I was wondering if there´s a feature to display the names of plotted arrays directly in the plot.
I want to figure out the name (e.g. 'voltage17') of the deviating lines (e.g. red line) in a comfortable way (via Plot Browser is not that cool :( )...
Any ideas?
Thanks,
-Thomas-

 Accepted Answer

KSSV
KSSV on 17 Aug 2021
Edited: KSSV on 17 Aug 2021
Read about the function text. With this you can place text any where on the plot.
x = 1:10 ;
y = x.^2 ;
plot(x,y) ;
hold on
text(x(end),y(end),'last point')

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Asked:

on 17 Aug 2021

Commented:

on 17 Aug 2021

Community Treasure Hunt

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

Start Hunting!