필터 지우기
필터 지우기

How to transfer diagram to figure

조회 수: 3 (최근 30일)
Tran Hoa
Tran Hoa 2020년 4월 11일
댓글: Tran Hoa 2020년 4월 11일
Hi members
Could you instruct me How to tranfer figure (a) to figure (b).
Thank you so much !

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 11일
You need the handle of the lines in figure (a) and handle of axes in figure(b), then use
copyobj(line_handles, axes_handle)
to copy the lines to figure(b)
  댓글 수: 3
Ameer Hamza
Ameer Hamza 2020년 4월 11일
See this example. First I plot the data you gave. Then I create a new figure, make a new line and then copy the line from figure 1 to figure 2.
YMatrix1=[0.3473, 0.3471, 0.3470,0.3468,0.3454,0.3452,0.3452,0.3452, 0.3423,0.3423];
semilogy1 = semilogy(YMatrix1,'LineWidth',2);
figure();
ax = axes();
plot(0.345+rand(1,10)*0.005, 'r');
copyobj(semilogy1, ax)
Tran Hoa
Tran Hoa 2020년 4월 11일
Thank you. I will try

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by