Effacer les filtres
Effacer les filtres

Show Names of Variables in Plot

3 vues (au cours des 30 derniers jours)
Thomas Fab
Thomas Fab le 17 Août 2021
Commenté : Thomas Fab le 17 Août 2021
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-

Réponse acceptée

KSSV
KSSV le 17 Août 2021
Modifié(e) : KSSV le 17 Août 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')
  1 commentaire
Thomas Fab
Thomas Fab le 17 Août 2021
perfect, thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by