# NOT RUN {
colours <- grDevices::palette.colors()[c("vermillion", "bluishgreen",
"blue", "skyblue", "reddishpurple", "orange")]
## Abel polynomials
n <- 0:4
plot(
xlim = c(-3, 6), ylim = c(-20, 30),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("p"),
as.symbol("n")), as.symbol("x"))),
main = "Abel Polynomials"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Abel(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2])
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
graphics::title(sub = ~"All with" ~ list(a == 1), adj = 1)
## Bessel polynomials
n <- 0:5
plot(
xlim = c(-3, 6), ylim = c(-10, 20),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("y"),
as.symbol("n")), as.symbol("x"))),
main = "Bessel Polynomials"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Bessel(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2])
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
## Reverse Bessel polynomials
n <- 0:5
plot(
xlim = c(-10, 10), ylim = c(-10, 20),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("theta"),
as.symbol("n")), as.symbol("x"))),
main = "Reverse Bessel Polynomials"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(rBessel(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2])
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
## Chebyshev polynomials of the first kind
n <- 0:4
plot(
xlim = c(-1, 1), ylim = c(-1, 1),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("T"),
as.symbol("n")), as.symbol("x"))),
main = "Chebyshev polynomials of the first kind"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Chebyshev1(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2]
)
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
## Chebyshev polynomials of the second kind
n <- 0:4
plot(
xlim = c(-1, 1), ylim = c(-4, 5),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("U"),
as.symbol("n")), as.symbol("x"))),
main = "Chebyshev polynomials of the second kind"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Chebyshev2(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2]
)
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
## Cyclotomic polynomials
n <- 1:5
plot(
xlim = c(-3, 3), ylim = c(-10, 10),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("Phi"),
as.symbol("n")), as.symbol("x"))),
main = "Cyclotomic Polynomials"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Cyclotomic(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2]
)
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
## Hermite polynomials
n <- 0:5
plot(
xlim = c(-3, 6), ylim = c(-10, 20),
panel.first = graphics::grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = as.call(list(call("[", as.symbol("H"),
as.symbol("n")), as.symbol("x"))),
main = "Hermite Polynomials"
)
for (i in seq_along(n)) {
graphics::lines(as.polynomial(Hermite(n[[i]])),
col = colours[[i]], n = 1001, lwd = 2,
xlim = graphics::par("usr")[1:2]
)
}
graphics::box()
graphics::legend(
x = "bottomright",
legend = as.expression(lapply(X = n, FUN = function(n1) {
call("==", as.symbol("n"), n1)
})),
col = colours[seq_along(n)],
lwd = 2,
bty = "n"
)
# }
Run the code above in your browser using DataLab