Get and figure

Source: Internet
Author: User

1. Get

Scrsz = get (0, 'screensize'); % displays the resolution of the computer,


Each computer has only one root object of the handle, that is, the screen. Its handle is always 0.


Screensize is four-dimensional vector: [left, bottom, width, height].


For example:

> Scrsz = get (0, 'screensize ')

Scrsz =
1 1280 800
1280 and 800 are the resolution settings of the computer. Note: to change the resolution settings, restart the computer.

To take effect. Scrsz (4) is 800, scrsz (3) is 1280


2. Figure

Set the size of figure to 1/4 and place it in the top left corner:
Figure ('position', [1 scrsz (4)/2 scrsz (3)/2 scrsz (4)/2])

The figure outerposition attributes include title bar, menu bar, tool bars, and outer edges.

The figure position attribute does not include title bar, menu bar, tool bars, and outer edges.

Set (0, 'hideunincluented', 'off ')
> Get (GCF)
...
Position = [360 278 560 420]
...
Outerposition = [352 270 576 511]
...
Set the axis position. The axes outerpositio attributes include axis labels, title, and a margin. For a figure with only one axes object
The position attribute of axes is not including the tick marks and labels, title, and axis labels within the boundaries of axes.
The axesde tightinset attribute is the blank distance between the axes text labels, title, and axis labels. And the axes boundary.
Set (GCO, 'Units ', 'pixels ')
Get (GCO)
...
Outerposition = [1 560 420]
...
Position = [73.8 47.2 434 342.3]
...
Tightinset = [22 17 5 8]


Modified from: http://blog.csdn.net/lulubooboo/article/details/7313600

This article is from the squirrel blog, please be sure to keep this source http://apinetree.blog.51cto.com/714152/1546850

Get and figure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.