I try to reproduce the example of the following link: Example: The Polynomials.jl logo,
but I don’t get the image shown in the link:
I only get the following image
#https://juliamath.github.io/Polynomials.jl/stable/reference/#Polynomials.fit
using Plots, Polynomials
# T1, T2, T3, and T4:
chebs = [
ChebyshevT([0, 1]),
ChebyshevT([0, 0, 1]),
ChebyshevT([0, 0, 0, 1]),
ChebyshevT([0, 0, 0, 0, 1]),
]
colors = ["#4063D8", "#389826", "#CB3C33", "#9558B2"]
itr = zip(chebs, colors)
(cheb,col), state = iterate(itr)
p = plot(cheb, c=col, lw=5, legend=false, label="")
for (cheb, col) in Base.Iterators.rest(itr, state)
plot!(cheb, c=col, lw=5)
end
How to achieve the expected graph?