PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Visualization and Graphics
>
Symbolic Graphics Language
>
Graphics Objects
>
Line
>
BUILT-IN MATHEMATICA SYMBOL
Three-Dimensional Graphics Primitives
Three-Dimensional Graphics Directives
The Structure of Graphics
Tutorials »
|
Arrow
Polygon
BezierCurve
BSplineCurve
Tube
EdgeForm
Thick
Thin
ListLinePlot
Point
See Also »
|
Graphics Objects
Precollege Education
Summary of New Features in 7.0
Symbolic Graphics Language
New in 6.0: Graphics Primitives & Directives
More About »
Line
Line
is a graphics primitive that represents a line joining a sequence of points.
Line
represents a collection of lines.
MORE INFORMATION
Line
can be used in both
Graphics
and
Graphics3D
(two- and three-dimensional graphics).
The positions of points can be specified either in ordinary coordinates, as
or
, or in scaled coordinates, as
Scaled
or
Scaled
.
»
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
, as well as
Thick
and
Thin
.
»
Line dashing can be specified using
Dashing
or
AbsoluteDashing
, as well as
Dashed
,
Dotted
, etc.
»
Line shading or coloring can be specified using
CMYKColor
,
GrayLevel
,
Hue
,
Opacity
, or
RGBColor
.
»
The option
VertexColors
can be used to specify that the color of the line should interpolate between colors
specified for each point.
In 3D, the option
VertexNormals
can be used to specify effective normals at each point, to be interpolated for purposes of smooth shading.
Joining of line segments can be specified using
JoinForm
.
Line caps can be specified using
CapForm
.
Individual coordinates and lists of coordinates in lines can be
Dynamic
objects.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
A line primitive:
Differently styled 2D lines:
Differently styled 3D lines:
A line primitive:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Differently styled 2D lines:
In[1]:=
In[2]:=
Out[2]=
Differently styled 3D lines:
In[1]:=
In[2]:=
Out[2]=
Scope
(14)
Single line segment:
Multiple connected line segments:
Multiple disconnected line segments:
Lines with different thicknesses:
Thickness in scaled size:
Thickness in printer's points:
Dashed lines:
Colored lines:
Line caps can be specified using
CapForm
:
Joining of line segments can be specified using
JoinForm
:
Colors can be specified at vertices using
VertexColors
:
Normals can be specified at vertices using
VertexNormals
for 3D lines:
Use
Scaled
coordinates:
Use
ImageScaled
coordinates in 2D:
Use
Offset
coordinates in 2D:
Options
(3)
Line with vertex colors:
Specify vertex colors for 3D lines:
Specify vertex normals for 3D lines:
Applications
(5)
Complete graph with 11 nodes:
The tangent bundle for a quadratic curve:
A vector field:
2D random walk on a regular lattice:
3D random walk on a regular lattice:
Replace
Polygon
with
Line
to have special rendering effects:
Use a random collection of light sources:
Properties & Relations
(2)
Several visualization functions produce
Line
objects:
Use directive styles appropriate for lines:
You can also transform the output:
The same idea applies in 3D:
This shows the points at which it was sampled:
Possible Issues
(1)
Line
objects need to be specified using numbers that can be represented by machine numbers:
Neat Examples
(4)
A random collection of lines:
Lines with lighting:
Moiré pattern:
Tangent vectors along an elliptic curve:
SEE ALSO
Arrow
Polygon
BezierCurve
BSplineCurve
Tube
EdgeForm
Thick
Thin
ListLinePlot
Point
TUTORIALS
Three-Dimensional Graphics Primitives
Three-Dimensional Graphics Directives
The Structure of Graphics
MORE ABOUT
Graphics Objects
Precollege Education
Summary of New Features in 7.0
Symbolic Graphics Language
New in 6.0: Graphics Primitives & Directives
New in 1 | Last modified in 7