Legend entries independent of drawn lines
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167645/image.png)
Hey everybody,
as seen in the attached picture I have some lines with two varying parameters c and d. c is represented by a different color and d as a different line style. Now I have 9 entries. I would rather have a legend with just the color X represents c = ... and line style Y represents d = ... That would give me only 6 entries. Is this possible in any way? It is not that bad in the picture, but gets annoying with more lines that I have
At the moment I create my legend like this:
for n = 1:size_c
for k = 1:size_d
legendInfo{:,size_d*(n-1) + k} = ['$c_{AVB}$ = ' num2str(c(n)) ' $\frac{N}{m}$, ' '$d_{AVB}$ = ' num2str(d(k)) ' $\frac{Ns}{m}$'];
end
end
legend(legendInfo,'Interpreter','latex');
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Legend in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!