Plot methods for polynom or polylist objects
# 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)
Nothing of interest, invisibly
A polynom or polylist object to be plotted
as for graphics::plot
as for graphics::plot
as for graphics::plot
additional arguments passed on to methods
Colour(s) and line type(s) as for graphics::plot
positive integer defining the point or curve resolution
logical: for "polylist" objects, should a legend be drawn alongside the main plot?
x-limits for the polynomial, default: the entire plot. For polylist objects this may be a two column matrix.
p <- poly_from_zeros((-3):4)
plot(p)
lines(deriv(p), col = "red")
Run the code above in your browser using DataLab