## `plot::modify` -- create modified copies of graphical objects

#### Introduction

`plot::modify``(o, option1, option2...)` creates a copy of the graphical objects `o` and sets the plot options given in `option1, option2...` to this copy.

#### Call(s)

`plot::modify(o <, option1, option2>...)`

#### Parameters

`o` | - | graphical scene, or a graphical object (i.e., an object of type `"graphprim"`)
`option1, option2, ...` | - | plot option(s) of the form `option = value`

#### Returns

object of the domain type as `o`.

#### Related Functions

`plot::copy`

#### Details

- If a plot option of `o` is changed via the slot operator `::`, e.g., the color of `o` by calling `o::Color:= rgbvalue`, then the object `o` (and possibly the objects of that `o` consists) is changed due to the reference effect of domains.

  With `plot::modify` you can directly change plot options of a copy of `o`.

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

  Note that plot options for graphical objects are not allowed! You may give such options as optional arguments to the corresponding function call creating the object `oi` (i = 1,2,...).

#### Example 1

We create an object representing a graph of a two-dimensional function:

    >> f:= plot::Function2d(sin(x), x = 0..2)

                        plot::Function2d(sin(x), x = 0..2)

Then the following call creates a copy of the object `f` and changes its color to blue and the line width to the value 12:

    >> g:= plot::modify(f, Color = RGB::Blue, LineWidth = 12)

                        plot::Function2d(sin(x), x = 0..2)

    >> f::Color, f::LineWidth, g::Color, g::LineWidth

            [Flat, [1.0, 0.0, 0.0]], FAIL, [Flat, [0.0, 0.0, 1.0]], 12

#### Changes

- new function

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