yyaxis legend within app

조회 수: 4 (최근 30일)
Owen Gebler
Owen Gebler 2017년 2월 13일
댓글: Owen Gebler 2017년 8월 3일
Within an app, (created using the App Designer) is it possible to create a legend containing entries for all lines within an axes, despite the lines being plotted on different y axes using the yyaxis function? For example, the following code will result in only a single legend entry being created, despite there being two lines on the axes:
x = linspace(0,10);
y = sin(3*x);
z = sin(3*x).*exp(0.5*x);
yyaxis(app.UIAxes,'left')
app.plot1 = plot(app.UIAxes,x,y);
yyaxis(app.UIAxes,'right')
app.plot2 = plot(app.UIAxes,x,z);
legend(app.UIAxes,{'plot1' 'plot2'};

답변 (1개)

Teaking
Teaking 2017년 8월 3일
It is not possible before 2016b
  댓글 수: 1
Owen Gebler
Owen Gebler 2017년 8월 3일
This behaviour is from 2016b.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by