필터 지우기
필터 지우기

how to call back legend again

조회 수: 2 (최근 30일)
areej abdulshaheed
areej abdulshaheed 2019년 4월 2일
댓글: Rik 2019년 4월 2일
I wanted to change the preporities of my legend. I don't remmemer what I did, but I think I made everything off and the legend disappaear and I can't call it back again
the following messege appaer every time I tried to insirt it
Attempt to execute SCRIPT legend as a function:
C:\Users\Areej\Desktop\matlab\legend.m
Error in insertmenufcn (line 61)
legend(cax,'off');
Error while evaluating ToggleTool ClickedCallback
  댓글 수: 5
Rik
Rik 2019년 4월 2일
'Answer' by areej abdulshaheed moved here:
I used this code
subplot 221
plot(time,Q1,'--',time,Q4,'.-',time,Q7)
xlabel('time'), ylabel('joint angle [rad]')
legend('\phi 1','\phi 2','\phi 3')
axis([0 20 -0.7 0.7])
Rik
Rik 2019년 4월 2일
I can't reproduce this issue on my copy of R2015a with the code below.
%create a clean figure and some random data for debugging
figure(1),clf(1)
time=linspace(0,20,200);
Q1=0.6*sin(time);
Q4=0.6*sin(time+1);
Q7=0.6*sin(1.1*time);
subplot 221
plot(time,Q1,'--',time,Q4,'.-',time,Q7)
xlabel('time'), ylabel('joint angle [rad]')
legend({'\phi 1','\phi 2','\phi 3'})
axis([0 20 -0.7 0.7])

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

답변 (0개)

카테고리

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

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by