How to add a legend entry for labels
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have 3 data points on a plot that each have a label adjacent to them displaying a percent value: an x marker with a [110%] NE of it for example.
In my legend, I would like to add an entry that looks like this: '[%] = Dp' so that readers know the percentages displayed next to points represent the dilution percentage.
How can I add this to my legend and keep it looking professional? Thanks!
4 commentaires
Réponses (1)
Arif Hoq
le 28 Fév 2022
you did not attach your data here. I have taken a simple plot example here. you can just rename in the legend function whatever you want.
x = linspace(0,pi);
y1 = cos(x);
plot(x,y1)
hold on
y2 = cos(2*x);
plot(x,y2)
hold off
lgd = legend('[10%] = Dp','[20%] = Dp');
0 commentaires
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
