Code covered by the BSD License  

Highlights from
Precise Figure Placing

4.5

4.5 | 2 ratings Rate this file 5 Downloads (last 30 days) File Size: 120 KB File ID: #19646
image thumbnail

Precise Figure Placing

by Markus Buehren

 

20 Apr 2008 (Updated 11 Apr 2011)

This contribution provides functions for precisely placing a figure to a given screen location.

| Watch this File

File Information
Description

This contribution provides functions for precisely placing a figure to a given screen location, like the upper left corner, the top half of the screen or the full screen. The figure is placed precisely adjacent to the screen borders and will not overlap the task bar at the screen bottom. In order to achieve this, the left and right borders of a figure as well as the height of the figure head, the menu bar etc. are obtained by analyzing a screen shot of a test figure.

Example 1:
fh = figure;
placefigure(fh, 'top left');

Example 2:
fh1 = figure;
fh2 = figure;
fh3 = figure;
fh4 = figure;
placefigure(fh1, [2 2 1 1]);
placefigure(fh2, [2 2 1 2]);
placefigure(fh3, [2 2 2 1]);
placefigure(fh4, [2 2 2 2]);

Run function placefiguredemo.m to start a demonstration of the capabilities of this package.

Known issues:

* The retrieval of the task bar height is expected to work only if the task bar is at the bottom of the screen. Further, the analysis of a screen shot is not extremely fail-safe. If it fails on your machine, please let me know.

* This package does not work under Octave, as the root/figure properties are different.

Acknowledgements

This file inspired Script Execution Notifier Using Pushover.

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
annotation, border, customization(2), figure(2), placing, screen, screen size, task bar, window
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
19 Apr 2011 Jiro Doke

Nice tool. I can see it being very useful when working with many figures. Is there a reason why you didn't put all the helper functions in subfunctions? You can have fewer files for easy file management.

30 May 2008 Andrea Soldan

it works correctly and i think that it is useful in a lot of simulation job (i've often think about a way to place pictures where i've preferred...).

Updates
22 Apr 2008

Documentation updated.

12 Aug 2008

Bug fixed.

02 Oct 2008

Bug fixed.

11 Apr 2011

Only E-mail changed in html documentation.

Contact us