フィルターのクリア

Drawing two figures from the same program

1 回表示 (過去 30 日間)
Sumit
Sumit 2011 年 4 月 4 日
I m drawing a bar graph, "figure1" and after executing certain no of codes i want to draw a new bar graph in a different figure.But in my case i m using "Hold off" which is resulting a new figure which is replacing the old one in the figure "figure1"....how do i draw a separate figure..say "figure2"...keeping the old one "figure1" unchanged..

回答 (2 件)

Sean de Wolski
Sean de Wolski 2011 年 4 月 4 日

Paulo Silva
Paulo Silva 2011 年 4 月 4 日
close all %close all open figures
fig1=figure(1) %create one figure
%draw something on figure
fig2=figure(2) %create another figure
%draw something on figure
%figure 2 is now the current figure
%if you want to select figure 1 for the current figure
figure(fig1)
%now you are adding stuff to the figure 1 again

カテゴリ

Help Center および File ExchangeDialog Boxes についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by