This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Rectangle

Rectangle
is a two-dimensional graphics primitive that represents a filled rectangle, oriented parallel to the axes.
Rectangle
corresponds to a unit square with its bottom-left corner at .
  • FaceForm and EdgeForm can be used to specify separately how the interiors and boundaries of rectangles should be drawn. The default is that no explicit edge is drawn. »
  • The option RoundingRadius->r can be used to specify rounded corners rendered using circles of radius r.
  • Coordinates and lists of coordinates in rectangles can be Dynamic objects.
A unit square:
Two squares:
Various rectangles:
Differently styled rectangles:
A unit square:
In[1]:=
Click for copyable input
Out[1]=
 
Two squares:
In[1]:=
Click for copyable input
Out[1]=
 
Various rectangles:
In[1]:=
Click for copyable input
Out[1]=
 
Differently styled rectangles:
In[1]:=
Click for copyable input
Out[1]=
A unit square
A rectangle parallel to each axis:
Short form for a unit cube with corner at the origin:
Color directives specify the face colors of rectangles:
FaceForm and EdgeForm can be used to specify the styles of the interior and boundary of a rectangle:
Use Scaled coordinates:
Use ImageScaled coordinates:
Use Offset coordinates:
Use rounded corners:
A simple bar chart:
Golden rectangle:
Square wheel:
The trajectory of the square wheel:
Use Rotate to get all possible rectangles:
Rectangle is a special case of Polygon:
A collection of random squares:
A color wheel:
Digital petals:
New in 1 | Last modified in 7