PolynomF (version 2.0-2)

plot.polylist: Plot method for polynomials

Description

Plot methods for polynom or polylist objects

Usage

# S3 method for polylist
plot(x, xlim = 0:1, ylim = range(Px), type = "l",
  xlab = "x", ylab = "P(x)", ..., col = seq_along(x), lty = if
  (length(col) == 1) seq_along(x) else "solid", len = 1000,
  legend = FALSE)

# S3 method for polynom plot(x, xlim = 0:1, ylim = range(Px), type = "l", xlab = "x", ylab = "p(x)", ..., len = 1000, limits = pu[1:2])

# S3 method for polynom lines(x, ..., len = 1000, limits = pu[1:2])

# S3 method for polynom points(x, ..., len = 100, limits = pu[1:2])

# S3 method for polylist lines(x, ..., len = 1000, limits = pu[1:2], col = seq_along(x), lty = if (length(col) == 1) seq_along(x) else "solid")

# S3 method for polylist points(x, ..., len = 100)

Arguments

x

A polynom or polylist object to be plotted

xlim, ylim

as for graphics::plot

type

as for graphics::plot

xlab, ylab

as for graphics::plot

...

additional arguments passed on to methods

col, lty

Colour(s) and line type(s) as for graphics::plot

len

positive integer defining the point or curve resolution

legend

logical: for "polylist" objects, should a legend be drawn alongside the main plot?

limits

x-limits for the polynomial, default: the entire plot. For polylist objects this may be a two column matrix.

Value

Nothing of interest, invisibly

Examples

Run this code
# NOT RUN {
p <- poly_from_zeros((-3):4)
plot(p)
lines(deriv(p), col = "red")
# }

Run the code above in your browser using DataLab