Set default to plot in a new figure
6 ビュー (過去 30 日間)
古いコメントを表示
Is it possible to set the MATLAB default to automatically open plots in a new figure instead of reusing the current figure?
1 件のコメント
回答 (2 件)
Star Strider
2014 年 9 月 9 日
編集済み: Star Strider
2014 年 9 月 9 日
It won’t automatically do that (it can’t guess what you’re thinking, unfortunately), but you can program it to do so.
Use the figure function:
x = linspace(0,2*pi,250);
for k1 = 1:3
y = sin(k1*x);
figure(k1)
plot(x, y)
grid
axis tight
end
You can also use a variation on this theme to produce subplot axes in a figure.
0 件のコメント
Erin
2014 年 9 月 9 日
2 件のコメント
Star Strider
2014 年 9 月 9 日
I looked through ‘Options’ and the available online documentation and couldn’t find anything on changing that default. The closest you can likely get is the newplot function. I doubt if it would work as a default anyway, since it reads the current figure’s 'NextPlot' property and acts accordingly.
jkr
2018 年 5 月 8 日
Can this become an enhancement request please? Reuse figure as a default does all kinds of stupid things, like plotting a histogram on the axes of a prior scatterplot. These can be readily corrected, but involve unnecessary rework. The ability to create plots quickly and easily in the variable browser is a powerful convenience. Why not make it work a bit better. It seems it should be simple.
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!