pnt
and dspoint
are the same function.
This function takes a single point and creates an object displaying the point, and optionally
it's behavior throughout iterations of the system.
dspoint(x, y, label = "", pch = 21, size = 2, col = "blue", regionCol = NULL, image = "", offset = NULL, display = TRUE, fixed = FALSE, iters = 0, attractor = FALSE, crop = TRUE, artificial = FALSE, ...)
x | The x-coordinate of the point. |
---|---|
y | The y-coordinate of the point. |
label | A string label. Text can be input in the form of pseudo-LaTeX code within quotes.
See |
pch | Plotting 'character' or symbol to use, default is 21 (filled circle). See |
size | Determines the size of the point. |
col | A string color for the point.
Use "NA" or "" to hide the point. See also |
regionCol | An alternate color used to define the color of the region for
|
image | A single color as a string, or a vector of colors as a string. See details for more information. |
offset | This will offset the label. Enter as |
display | Set display = FALSE to hide the dot, but still add to your system.
Mostly useful for |
fixed | A flag to declare a fixed point. The image of any fixed point is should be the original point. |
iters | Determines the number of iterations of the function when making a color gradient.
Use |
attractor | A flag to delcare a point as an attractor: a fixed point for the function that
other points converge to. Used in |
crop | If |
artificial | For internal use. |
... | Extra graphical parameters to be sent through |
The dspoint
object begins with an initial point. Images of the point may be displayed in three ways.
If the image
parameter is a single color and iters
is not set, then dspoint
will calculate and display
the image of the point under the model's function in that color.
If the image
parameter is a vector of k colors, then dspoint
calculates and
displays k successive images of the point using those colors.
The string "NA" may be used to avoid displaying an iteration.
If the image
parameter is a single color and iters
is defined, then iters
successive images are displayed, using a gradient between col
and image
.
In most cases, rather than specifying col
and image
separately, they may be
combined into a single vector.
library(dsmodels) fun <- function(X,Y) { list( X/exp(Y), Y/exp(X) ) } model <- dsmodel(fun, title = "A Single Point") model + dsrange(3,3, discretize = .09) + dspoint(1,2, col = "magenta")dsmodel(fun, title = "A Point and a Label") + dsrange(3,3, discretize = .09) + dspoint(2.2, 2.1, label = "$x^{\\alpha}$", col = "green")