## `plot::data` -- create two- and three-dimensional plots of data

#### Introduction

`plot::data``(format, datalist)` plots data specified in `datalist` in different formats, such as points, columns, beams or pie-charts.

#### Call(s)

`plot::data(format, datalist <, option1, option2...>)`

#### Parameters

`format` | - | either Beam, Column, Curve, Line, Piechart2d, Piechart3d, Plain, Points, LinesPoints, CurvesPoints or Surface
`datalist` | - | either list of numerical values, or a list of lists, where each inner list is a list of numerical values
`option1, option2, ...` | - | plot option(s) of the form `option = value`, including the special plot option Colors

#### Options

`Colors` | - | list of RGB color specifications, i.e., list of three real numerical values between 0 and 1.

#### Returns

an object of the domain type `plot::Scene`.

#### Related Functions

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

#### Details

- Call `plot(...)` to display the plot of the data on the screen.

- Note that `plot::data` does not return a graphical object but a graphical scene!

- The plot options `option1`, `option2`... must be valid plot options for two or three-dimensional graphical scenes, respectively. See `plot2d` and `plot3d` for details.

#### Option: Piechart2d and Piechart3d

- A two- or three-dimensional piechart is drawn, respectively.
- You can specify a color for every object with the plot option Colors.

#### Option: Plain and Surface

- These plotting types are used to create a 3-d surface plotting from data. `datalist` must be a list of lists of numeric values. Each of the values in the list `[z_i_1,...,z_i_n]` are interpreted as the z-value corresponding to the y-value i and x-values `1,...,n`, i.e., the points `(1,i,z_1),...,(n,i,z_n)`. Consists the list of `m` lists `i=1,...,m`.
- Surface computes the 2-dimensional Lagrange interpolation polynomial to plot the surface. `datalist` is a list `[d_1,...,d_n]`.
- You can specify a color for every object with the plot option Colors.

#### Option: Points, LinesPoints and CurvesPoints

- With Points a point for each entry of `datalist` is drawn.
- With LinesPoints, these points are connected by lines.
- With CurvesPoints, these points are connected by cubic splines.
- You can specify a color for every object with the plot option Colors.

#### Option: Line, Curve, Column and Beam

- These plotting types are used to create a 2-d plotting from data. `datalist` must be a list of lists of numeric values. Each of the values in the list `[y_1,...,y_n]` are interpreted as the y-value corresponding to the x-values `1,...,n`, i.e., the points `(1,y_1),...,(n,y_n)` are plotted. The values of one list defines an object.
- Curve computes the Lagrange interpolation polynomial to plot the curve.
- You can specify a color for every object with the plot option Colors.

#### Example 1

    >> plot(plot::data(
           Piechart2d, [5,12,38,14,25]
       ))

    >> plot(plot::data(
           Piechart3d, [5,12,38],
           Colors = [RGB::RoyalBlue, RGB::VioletRed, RGB::GreenPale]
       ))

#### Example 2

    >> plot(plot::data(
           Lines, [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]],
           Colors = [RGB::Red, RGB::Green, RGB::Blue]
       ))

#### Example 3

    >> plot(plot::data(
           Columns, [[5,10,24,-3,6,5,2,18]]
       ))

    >> plot(plot::data(
           Columns, [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]],
           Colors = [RGB::Red, RGB::Green, RGB::Blue]
       ))

#### Example 4

    >> plot(plot::data(
           Beams, [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]],
           Colors = [RGB::Red, RGB::Green, RGB::Blue],
           Axes = Box
       ))

#### Example 5

    >> plot(plot::data(
           Curves, [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]],
           Colors = [RGB::Red, RGB::Green, RGB::Blue]
       ))

#### Example 6

    >> plot(plot::data(
           Surface, [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]]
       ))

#### Example 7

    >> plot(plot::data(Plain,
           [[5,10,24,-3], [6,5,2,18], [19,45,12,-10]],
           Colors = [RGB::Red, RGB::Red, RGB::Green]
       ))

#### Changes

- used to be called `plotlib::dataplot`
- `plot::data` is now part of the new plot library `plot`, and its calling syntax and the return value were changed.
- new plot formats: `Points`, `LinesPoints` and `LinesPoints`.

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