represents the line segments joining a sequence for points .

represents a collection of lines.

Details and OptionsDetails and Options


  • Line is a graphics and geometry primitive that represents a geometric line segment or sequence of connected line segments (a poly-line). The location of a Line connecting points in -dimensional space is specified as a list argument consisting of sublists, with each sublist containing Cartesian coordinate values. The coordinate sublists of Line objects may consist of exact or approximate values, where RegionEmbeddingDimension can be used to determine the dimension for a given Line expression. A collection of lines (or poly-lines) may be represented as a nested lists of -tuples inside a single Line primitive (a multi-line). The coordinates of Line objects may have exact or approximate values.
  • Line objects can be visually formatted in two and three dimensions using Graphics and Graphics3D, respectively. Line objects can also be used in geographical maps using GeoGraphics and GeoPosition (e.g. GeoGraphics[Line[GeoPosition[{{38.9,-77.0},{40.1,-88.3}}]]]). Finally, Line may serve as a region specification over which a computation should be performed.
  • While lines themselves have dimension 1 (as reported by the RegionDimension function) with zero thicknes, Line objects in formatted graphics expressions are by default styled to appear "thicker" than a 1-dimensional mathematical line. Furthermore, in graphical visualizations, lines are displayed at the same size regardless of varying distances from the view point. The appearance of Line objects in graphics can be modified by specifying thickness directives such as Thickness, AbsoluteThickness, Thick, and Thin; dashing directives such as Dashing, AbsoluteDashing, Dashed, Dotted, and DotDashed; edge and cap directives EdgeForm and CapForm; color directives such as Red; the transparency directive Opacity; and the style option Antialiasing. In addition, the colors of multi-lines may be specified using VertexColors, while the shading and simulated lighting of multi-lines within Graphics3D may be specified using VertexNormals.
  • GeometricTransformation and more specific transformation functions such as Translate and Rotate can be used to change the coordinates at which a Line object is displayed while leaving the underlying Line expression untouched.
  • Other graphics primitives such as Tube, Arrow, HalfLine and InfiniteLine may resemble those of stylized Line objects.
Introduced in 1988
| Updated in 2014