How to make figure window and command window apear top to bottom?

4 views (last 30 days)
Ok so I want make it so went I plot my figure that it appears on top half of the screen but at the same time make it so the command window appears at the bottom half of the screen when I run the script. How would I do this? Thanks.

Accepted Answer

Image Analyst
Image Analyst on 28 Apr 2014
Click and drag the command window to where you want it. Then after you plot your figure, use this:
% Enlarge figure to top half of the screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0.5 1 0.5]);
  2 Comments
Jack
Jack on 29 Apr 2014
So there is no way to position the command window automatically with the figure? I have to manually move it before i run the script? Thanks.
Image Analyst
Image Analyst on 29 Apr 2014
You'd have to use undocumented things, like Yair shows you http://undocumentedmatlab.com/?s=commandwindow
You can get the handle to the command window:
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
cmdWin = jDesktop.getClient('Command Window');
Then try to set it's alignmentX and alignmentY properties or something. I haven't done it, so you'll have to experiment.

Sign in to comment.

More Answers (1)

Jack
Jack on 2 May 2014
Thanks for the answer again.

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!