In [ ]:
using BasisFunctions
using FrameFun
using Plots
using DomainSets
# gr()
In [ ]:
B = ChebyshevBasis(5)
plot(B)
In [ ]:
plot(B[4])
In [ ]:
F=FourierBasis(5)
plot(F[2],plot_complex=true)
In [ ]:
B = ChebyshevBasis(5,-2,0)⊕FourierBasis(5,0,2)
plot(B[2:8],plot_complex=true)
In [ ]:
F = FourierBasis(10)⊗FourierBasis(10)
# plotlyjs()
plot(F[82],plot_complex=false)
In [ ]:
G = BasisFunctions.grid(ChebyshevBasis(51))
plot(G)
In [ ]:
G = BasisFunctions.grid(ChebyshevBasis(51,-1,0.3)⊗ChebyshevBasis(51,-0.5,0.5))
G = FrameFun.subgrid(G,mandelbrot())
plot(G)
In [ ]:
B = FourierBasis(21,-1,1)⊗FourierBasis(21,-1,1)⊗FourierBasis(21,-1,1)
D = ball()\FrameFun.cube(-0.5,0.5,-0.5,0.5,-2,2)
Df = ExtensionFrame(D,B)
G = BasisFunctions.grid(Df)
plot(G,size=(400,400))
In [ ]:
B=FourierBasis(51,-2.0,-0.5)
D=-1.7..-1.0
f=x->cos(3*x.^2)
F=Fun(f,B,D)
# Easily combine multiple plots
plot(BasisFunctions.grid(dictionary(F)),label="grid",markercolor=:white)
plot!(F,label="function", plot_ext=true)
plot!(F',title="Function and derivative",label="derivative",legend=true)
In [ ]:
plot(F,f,label="function")
df = x-> -sin(3*x^2)*6*x
plot!(F',df,label="derivative",legend=true)
In [ ]:
B = FourierBasis(21,-1,1)⊗FourierBasis(21,-1,1)
D = disk(0.8)\mandelbrot()
f = (x,y) -> cos(7*x-2*y^2)
F = Fun(f,B,D)
In [ ]:
plot(D,n=100)
In [ ]:
plot(F,size=(600,400))
multiple plot types are supported
In [ ]:
contourf(F,colorbar=true)
In [ ]:
plot(F,plot_ext=true)
In [ ]:
contour(F,f)
In [ ]:
In [ ]: