Skip to Main Content Skip to Search
Product Documentation

plot::Rectanglerectangles in 2D

plot::Rectangle(`x_{min}`..`x_{max}`, `y_{min}`..`y_{max}`) generates the 2D rectangle with the corners (`x_{min}`, `y_{min}`), (`x_{min}`, `y_{max}`), (`x_{max}`, `y_{min}`), (`x_{max}`, `y_{max}`).

→ Examples

Call:

plot::Rectangle(`x_{min}` .. `x_{max}`, `y_{min}` .. `y_{max}`, <a = amin .. amax>, Options)

Parameters:

`x_{min}` .. `x_{max}`

the left and right border of the rectangle: real numerical values or arithmetical expressions of the animation parameter a
`x_{min}` .. `x_{max}` is equivalent to the attributes XRange, XMin, XMax.

`y_{min}` .. `y_{max}`

the lower and upper border of the rectangle: real numerical values or arithmetical expressions of the animation parameter a
`y_{min}` .. `y_{max}` is equivalent to the attributes YRange, YMin, YMax.

See Also:

plot, plot::Box, plot::copy, plot::Line2d, plot::Line3d, plot::Polygon2d, plot::Polygon3d

Details:

Example 1

We plot two rectangles:

plot(plot::Rectangle(-2..2, -2..2, Filled = TRUE,
                     FillColor = RGB::Red),
     plot::Rectangle(1..5, 1..5, Filled = FALSE,
                     LineColor = RGB::Black,
                     LineStyle = Dashed))

MuPAD graphics

Example 2

We plot rectangles with different fill patterns (FillPattern):

plot(plot::Rectangle(0..1, 2..3, Filled = TRUE,
                     FillPattern = Solid,
                     FillColor = RGB::Red),
     plot::Rectangle(1..2, 2..3, Filled = TRUE,
                     FillPattern = CrossedLines,
                     FillColor = RGB::Green),
     plot::Rectangle(2..3, 2..3, Filled = TRUE,
                     FillPattern = XCrossedLines,
                     FillColor = RGB::Blue),
     plot::Rectangle(0..1, 1..2, Filled = TRUE,
                     FillPattern = HorizontalLines,
                     FillColor = RGB::Orange),
     plot::Rectangle(1..2, 1..2, Filled = TRUE,
                     FillPattern = VerticalLines,
                     FillColor = RGB::Violet),
     plot::Rectangle(0..1, 0..1, Filled = TRUE,
                     FillPattern = DiagonalLines,
                     FillColor = RGB::Brown),
     plot::Rectangle(1..2, 0..1, Filled = TRUE,
                     FillPattern = FDiagonalLines,
                     FillColor = RGB::Cyan))

MuPAD graphics

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS