3.0

3.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 1.84 KB File ID: #9035

Figure window placement - fig.m

by Miroslav Balda

 

15 Nov 2005 (Updated 17 Aug 2006)

Function fig.m opens figure window on coded place of the screen.

| Watch this File

File Information
Description

Function fig.m is prepared for fast positioning of a figure windows on screen by means of the window position code. The general positioning is also possible. Position codes belong to parts of the screen as follows:

 1 top left
 2 top right
 3 bottom left
 4 bottom right
 5 full screen
 6 left half
 7 right half
 8 upper half
 9 lower half
10 user defined position

The other way to define general position of a figure window is via the position vector of normalized measures [left bottom width height].
It obtains the position code equal 10.

 Function calling:
 ~~~~~~~~~~~~~~~~~
  fih = fig(pos); % Creates a figure window and its handle
  pos is a position code of the figure, or a vector of four real elements <= 1 = position measures
  fih is a handle of the figure

 Examples:
 ~~~~~~~~~
  hf = fig([.25, .25, .5, .5]); % figure in the center of the screen
  fig(2); % figure window in the right upper quarter of the screen
  fig(10); % last user's figure position (here in the screen center)

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
09 Dec 2005 Kelly K

The program works well, but unecessarily changes the DefaultFigureUnits property to 'normalized'. This will cause problems when running other code that does not anticipate this change (most of my scripts and functions expect the default to be pixels, and therefore all figures in those scripts are displayed incorrectly after a single use of fig.m).

14 Dec 2005 Miroslav Balda

The superfluous property 'normalized' has been removed and the code slightly modified. It should work well.

Please login to add a comment or rating.
Updates
16 Nov 2005

The update repairs damaged description of window codes

12 Dec 2005

Superfluous property

13 Dec 2005

An improvement in correspondence to the review

16 Aug 2006

Removed erroneous message of an antivirus program. Improved code of the function.

17 Aug 2006

Enhancement of the function behaviour

Tag Activity for this File
Tag Applied By Date/Time
figure window Miroslav Balda 22 Oct 2008 08:06:16
opens Miroslav Balda 22 Oct 2008 08:06:16
placement Miroslav Balda 22 Oct 2008 08:06:16
utilities Miroslav Balda 22 Oct 2008 08:06:16

Contact us at files@mathworks.com