How to adjust the legend of a graph in this case?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
In the below image each line has 3 segments which are represented with 3 colors. Lines are represented with *, - and + for 1st, 2nd and 3rd respectively. The problem is that in legend it is showing only one symbol with varying color which is not true in this case. In the legend, I want to show the corresponding symbol without color.
Please suggest me the code
figure
axes('FontSize', 20);
xlabel('1/T');ylabel('ln(g({\alpha})/T^{2}');title('@20^{0}C');
line_fewer_markers(T_3,O1_3,10,'-g*')
line_fewer_markers(T_6,O1_6,10,'-k*')
line_fewer_markers(T_8,O1_8,5,'-r*')
line_fewer_markers(T_3,O2_3,10,'-g-')
line_fewer_markers(T_6,O2_6,10,'-k-')
line_fewer_markers(T_8,O2_8,5,'-r-')
line_fewer_markers(T_3,O3_3,10,'-g+')
line_fewer_markers(T_6,O3_6,10,'-k+')
line_fewer_markers(T_8,O3_8,5,'-r+')
legend(' 1st ','2nd', '3rd')
.
Thanks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147692/image.png)
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!