How can I change the position of subplots ?

11 ビュー (過去 30 日間)
chrysostomos Aristidou
chrysostomos Aristidou 2013 年 11 月 28 日
コメント済み: Image Analyst 2013 年 11 月 28 日
I want to change the size and position of subplots I wrote this code: figure(1) set(gcf,... 'MenuBar' , 'none',... %No menubar on the GUI figure 'Position' , [300 100 540 540]); %Setting position and size of GUI figure subplot(2,2,1) subplot(2,2,2); subplot(2,2,3); subplot(2,2,4); h=subplot(2,2,1); hold on set(h , 'position' , [10 20 10 20]); hold off
The only thing that happens its that the subplot 2,2,1 disappears. Please help me

回答 (1 件)

Image Analyst
Image Analyst 2013 年 11 月 28 日
Be careful what your units are
get(gcf, 'units');
Also, if any plot would overlap another one, the one underneath (I think) disappears.
  2 件のコメント
chrysostomos Aristidou
chrysostomos Aristidou 2013 年 11 月 28 日
I modified set(h , 'position' , [10 500 10 20]);. Therefore subplot 2,2,1 would just get smaller in the same upper left hand area and still does not work
Image Analyst
Image Analyst 2013 年 11 月 28 日
No. You're thinking images, where the origin in on the top line. With plots, the origin is in the bottom left so you placed this plot under the lower left plot.

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by