plotting in same figure window
古いコメントを表示
It's needed while using same plot command, it plots in the same figure window and not in another figure window
for example:
h1 = figure;
plot(randn(100,1));
figure(h1)
now while using same above plot command, it's needed that plots in the same figure window and not in another figure window
採用された回答
その他の回答 (1 件)
Wayne King
2011 年 9 月 18 日
Do you want the plot to replace what is already there and keep the same axes?
h1 = figure;
plot(randn(100,1));
figure(h1)
ax = gca;
plot(ax,randn(100,1),'r');
Or do you want the plot to be in addition to what is there with the same axes?
h1 = figure;
plot(randn(100,1));
figure(h1)
ax = gca; hold on;
plot(ax,randn(100,1),'r');
Wayne
4 件のコメント
mohammad
2011 年 9 月 18 日
Fangjun Jiang
2011 年 9 月 18 日
In that case, use h1=figure(1) instead.
Fangjun Jiang
2011 年 9 月 18 日
See update in my answer.
mohammad
2011 年 9 月 18 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!