The rectangle function in matlab

Source: Internet
Author: User
Tags border color

Rectangle function: Creates a two-dimensional rectangular object.

Rectangle (' Position ', [x,y,w,h])
Draws a rectangle of width W high h from the point (x, y) and assigns a value to the Axis data unit.
Notice that the rectangle is displayed at a specified scale, and you need to set the axis data aspect ratio so that the x and Y axes have equal units of length. You can use the command axis equal or daspect ([1,1,1]).

Rectangle draws a rectangle whose default position is [0,0,1,1], and the default curvature is [0,0] (that is, no curvature).

Rectangle (..., ' curvature ', [x, y]) specifies the curvature of the edge of the matrix, which can vary from rectangle to ellipse, horizontal curvature x is the fraction of the rectangle width, and is bent along the top and bottom edges of the rectangle. The vertical curvature y is the fraction of the rectangular height, which bends along the left and right edges of the rectangle. The X and Y values range from 0 (no curvature) to 1 (maximum curvature). The value [0,0] Draws a rectangular rectangle, and the value [x, Y] draws an ellipse. If you specify only one value of curvature, then both the horizontal and vertical curvature have the same value.

h = Rectangle (...) Returns a handle to the created Rectangle object.
Note: The rectangle object is 2 dimensional, can only be drawn in the range of [0] (i.e., view (2)), the Rectangle object is a sub-object of the coordinates, is defined within the axis data.

Examples: Rectangle (' position ', [1,1,5,5], ' curvature ', [St], ' Edgecolor ', ' r ', ' Facecolor ', ' G ');
' Position ', [1,1,5,5] indicates a height of 5 from (a) point and a width of 5;
' Curvature ', [n] means that the curvature is 1 in the X, y direction, which is the arc;
' Edgecolor ', ' r ' indicates that the border color is red;
' Facecolor ', ' g ' indicates that the fill color in the polygon is green.
See the graphic:

The rectangle function in matlab

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.