plot::line -- graphical object for
lines
Introductionplot::line(p1, p2) returns a polygon
connecting the point p1 with the endpoint p2.
Call(s)plot::line(p1, p2 <, option1, option2...>)
Parametersp1, p2 |
- | points, i.e., objects of domain type plot::Point or lists of two or three
arithmetical expressions, respectively |
option1, option2, ... |
- | plot option(s) of the form option =
value |
Returnsa graphical object of the domain type plot::Polygon.
Related
Functionsplot, plot2d, plot3d, plot::Polygon
Detailsplot
to display the result on the screen.option1, option2... must
be valid plot options for two- or three-dimensional graphical objects,
respectively. See plot2d and plot3d for details.
Note that scene options are not allowed! You may
give scene options as optional arguments for the function plot, or use plot::Scene to create an object
representing a graphical scene.
Example
1We define a line starting at point (1;2) and ending at point (3;-1):
>> l := plot::line([1, 2], [3, -1])
plot::Polygon()
To plot this line, call plot:
>> plot(l)
Use expose to expose the points of a
line:
>> expose(l)
plot::Polygon(plot::Point(1, 2), plot::Point(3, -1))
Example
2To change the color of the line from the previous example, enter:
>> l::Color := RGB::Green: plot(l, Axes = Box)
Here the scene option Axes = Box was
given.