필터 지우기
필터 지우기

How to copy a figure in anothe figure?

조회 수: 229 (최근 30일)
vatankhah
vatankhah 2013년 7월 31일
편집: madhan ravi 2019년 1월 18일
Hello, I want to produce the same figures. For example I have figure(1),figure(2). figure(1) with some points that are plotted in it and figure(2) is an empty screen. I want to copy figure(1) in figure(2).How can I do this with commands in matlab? please help me thanks a lot

채택된 답변

David Staack
David Staack 2019년 1월 18일
편집: madhan ravi 2019년 1월 18일
plot(peaks)
a1 = gca
f2 = figure
a2 = copyobj(a1,f2)

추가 답변 (1개)

Jan
Jan 2013년 7월 31일
편집: Jan 2013년 7월 31일
This seems to be a task for copyobj
  댓글 수: 2
vatankhah
vatankhah 2013년 8월 1일
How can I use copyobj command to copy figure(1) for example. could you please explain it more by an example for figure(1)? thanks
Jan
Jan 2013년 8월 1일
편집: Jan 2013년 8월 1일
I think it is your turn to explain more details of what you want and what you have tried so far. It is not efficient, if I guess what "some points plotted in the figure" exactly means, because I will most likely not match your needs.
As the help text explains, copyobj duplicates objects to a new parent. So it does not copy the figure, but the objects the figure contains. The example contained in these docs should be descriptive enough already.

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

카테고리

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