Azzera filtri
Azzera filtri

Draw Legend in MATLAB

1 visualizzazione (ultimi 30 giorni)
S. David
S. David il 28 Lug 2014
Risposto: Sara il 28 Lug 2014
Hello all,
I have in one figure 5 cases, and in each case I have 3 curves. I distinguish the curves of a single case by no line, solid line, and dotted line. While distinguishing between the different cases by different marks.
If I put all these details in the "legend" it will be too big inside the figure. Instead, I want to put in the legend the 3 cases that distinguish the curves of each case but without the mark, and then I can specify the curves by text arrow.
How can I draw a legend for curves do not appear in the figure?
Thanks

Risposte (1)

Sara
Sara il 28 Lug 2014
For the plot you DO NOT want to show in the legend, do:
h = plot(x,y,'-+); %your data
set(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by