MATLAB: Subplot,it can not show the line’s name in plot broswer

subplot

it works well when not using subplot ,| why? how to handle it |

Best Answer

Roger, are you referring to the DisplayName?
subplot(2,1,1)
h1 = plot(x,y1)
set(h1,{'DisplayName'},{'xy1'})
subplot(2,1,2)
h2 = plot(x,y2)
set(h2,{'DisplayName'},{'xy2'})
Alternatively, you can set this property in the Property Editor: