How to adjust the legend of a graph in this case?
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!