This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Graphics and Sound / Graphics Primitives  /
Line

  • Line[ , , ... ] is a graphics primitive which represents a line joining a sequence of points.
  • Line can be used in both Graphics and Graphics3D (two- and three-dimensional graphics).
  • The positions of points can be specified either in absolute coordinates, as x , y or x , y , z , or in scaled coordinates as Scaled[ x , y ] or Scaled[ x , y , z ].
  • Offset can be used to specify coordinates in two dimensions.
  • The line consists of a sequence of straight segments joining the specified points.
  • Line thickness can be specified using Thickness or AbsoluteThickness.
  • Line dashing can be specified using Dashing or AbsoluteDashing.
  • Line shading or coloring can be specified using CMYKColor, GrayLevel, Hue or RGBColor.
  • See the Mathematica book: Section 2.9.2Section 2.9.8.
  • See also: Polygon, PlotJoined.
  • Related packages: Graphics`Arrow`, Graphics`Spline`.

    Further Examples

    Line creates a graphics object connecting the points in the list.

    Evaluate the cell to see the graphic.

    In[1]:=