In [ ]:
using BasisFunctions
using FrameFun
using Plots
using DomainSets
# gr()

Plotting the most common types

Plot FunctionSets


In [ ]:
B = ChebyshevBasis(5)
plot(B)

Plot FunctionSubSets


In [ ]:
plot(B[4])

Complex FunctionSets


In [ ]:
F=FourierBasis(5)
plot(F[2],plot_complex=true)

Combine FunctionSets


In [ ]:
B = ChebyshevBasis(5,-2,0)FourierBasis(5,0,2)
plot(B[2:8],plot_complex=true)

2D FunctionSets


In [ ]:
F = FourierBasis(10)FourierBasis(10)
# plotlyjs()
plot(F[82],plot_complex=false)

Plot grids

1D


In [ ]:
G = BasisFunctions.grid(ChebyshevBasis(51))
plot(G)

2D


In [ ]:
G = BasisFunctions.grid(ChebyshevBasis(51,-1,0.3)ChebyshevBasis(51,-0.5,0.5))
G = FrameFun.subgrid(G,mandelbrot())
plot(G)

3D


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))

Plot FrameFun


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)

plot errors


In [ ]:
plot(F,f,label="function")
df = x-> -sin(3*x^2)*6*x
plot!(F',df,label="derivative",legend=true)

2D


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)

Plot domains


In [ ]:
plot(D,n=100)

Plot framefuns


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 [ ]: