Skip to content

Commit 7a89790

Browse files
plotlyjs wins
1 parent 1c71fc0 commit 7a89790

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
FastTransforms = "057dd010-8810-581a-b7be-e3fc3b93f78c"
4-
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
54
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
65
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
76
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Documenter, FastTransforms, Literate, Plots
22

33
plotlyjs()
4-
gr()
54

65
const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples")
76
const OUTPUT_DIR = joinpath(@__DIR__, "src/generated")

examples/disk.jl

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# [documentation](https://MikaelSlevinsky.github.io/FastTransforms).
2121

2222
using FastTransforms, LinearAlgebra, Plots
23+
plotlyjs()
2324

2425
# Our function $f$ on the disk:
2526
f = (x,y) -> (x^2-y^2+1)/((x^2-y^2+1)^2+(2x*y+1)^2)
@@ -37,20 +38,12 @@ r = [sinpi((N-n-0.5)/(2N)) for n in 0:N-1]
3738
# On the mapped tensor product grid, our function samples are:
3839
F = [f(r*cospi(θ), r*sinpi(θ)) for r in r, θ in θ]
3940

40-
# We superpose the grid on top of a contour plot of $f$:
41+
# We superpose a surface plot of $f$ on top of the grid:
4142
X = [r*cospi(θ) for r in r, θ in θ]
4243
Y = [r*sinpi(θ) for r in r, θ in θ]
43-
44-
# PlotlyJS
45-
plotlyjs()
46-
scatter3d(vec(X), vec(Y), vec(0X); markersize=0.5, markercolor=:red, size=(600, 600))
44+
scatter3d(vec(X), vec(Y), vec(0X); markercolor=:red, size=(1000, 1000))
4745
surface!(X, Y, F; legend=false, xlabel="x", ylabel="y")
4846

49-
# GR
50-
gr()
51-
scatter3d(vec(X), vec(Y), vec(0X); markersize=0.5, markercolor=:red, size=(600, 600))
52-
surface!(vec(X), vec(Y), vec(F); legend=false, xlabel="x", ylabel="y")
53-
5447
# We precompute a (generalized) Zernike--Chebyshev×Fourier plan:
5548
α, β = 0, 0
5649
P = plan_disk2cxf(F, α, β)
@@ -99,20 +92,12 @@ z = [sinpi((M-2m-1)/(2M)) for m in 0:M-1]
9992
# On the mapped tensor product grid, our function samples are:
10093
F = [f(x[n], w[n]*z) for n in 1:N, z in z]
10194

102-
# We superpose the grid on top of a contour plot of $f$:
95+
# We superpose a surface plot of $f$ on top of the grid:
10396
X = [x for x in x, z in z]
10497
Y = [w*z for w in w, z in z]
105-
106-
# PlotlyJS
107-
plotlyjs()
108-
scatter3d(vec(X), vec(Y), vec(0X); markersize=0.5, markercolor=:green, size=(600, 600))
98+
scatter3d(vec(X), vec(Y), vec(0X); markercolor=:red, size=(1000, 1000))
10999
surface!(X, Y, F; legend=false, xlabel="x", ylabel="y")
110100

111-
# GR
112-
gr()
113-
scatter3d(vec(X), vec(Y), vec(0X); markersize=0.5, markercolor=:green, size=(600, 600))
114-
surface!(vec(X), vec(Y), vec(F); legend=false, xlabel="x", ylabel="y")
115-
116101
# We precompute a Dunkl-Xu--Chebyshev plan:
117102
P = plan_rectdisk2cheb(F, β)
118103

0 commit comments

Comments
 (0)