## `plot::line` -- graphical object for lines

#### Introduction

`plot::line``(p1, p2)` returns a polygon connecting the point p1 with the endpoint p2.

#### Call(s)

`plot::line(p1, p2 <, option1, option2...>)`

#### Parameters

`p1, 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`

#### Returns

a graphical object of the domain type `plot::Polygon`.

#### Related Functions

`plot`, `plot2d`, `plot3d`, `plot::Polygon`

#### Details

- Use the function `plot` to display the result on the screen.
- The plot options `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 1

We 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 2

To 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.

#### Changes

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000