How to copy a figure in anothe figure?
252 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
David Staack
2019-1-18
编辑:madhan ravi
2019-1-18
plot(peaks)
a1 = gca
f2 = figure
a2 = copyobj(a1,f2)
0 个评论
更多回答(1 个)
Jan
2013-7-31
编辑:Jan
2013-7-31
2 个评论
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 Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!