Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new tricontourf #18

Merged
merged 7 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 144 additions & 122 deletions docs/Manifest.toml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ makedocs(;
deploydocs(;
repo="github.com/DanielVandH/NaturalNeighbours.jl",
devbranch="main",
push_preview=true
)
Binary file modified docs/src/figures/differentiation_exact_surfaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/example_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/example_tessellation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/flap_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/fnear_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/fsib0_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/fsib1_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/ftri_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/gradient_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/gradient_surface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/gradient_surface_2_direct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/hessian_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/hessian_data_iterative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/hessian_data_no_cubic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/hessian_surface_direct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/influence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/joint_gradient_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/sibson_vs_sibson1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/sibson_vs_sibson1_project_false.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/swiss_heights_interpolated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/figures/swiss_heights_interpolated_projected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions docs/src/swiss.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ boundary_points = [(boundary[i, 1], boundary[i, 2]) for i in axes(boundary, 1)]

# Downsampling and Setting up the Data for Plotting

We now setup the data for plotting. We want to use `tricontourf!`, so we need to get a triangulation of the data. If we just let Makie compute the triangulation, it will be unconstrained and won't show us the actual data properly. So, some extra work is required. Furthermore, the `boundary_points` do not actually store a subset of the points from `data_sites`, so we can't just do e.g. `indexin(boundary_points, data_sites)` to get the associated boundary indices, so we instead find the closest data site to each boundary point.
We now setup the data for plotting. We want to use `tricontourf!`, so we need to get a triangulation of the data. Since the `boundary_points` do not actually store a subset of the points from `data_sites`, we can't just do e.g. `indexin(boundary_points, data_sites)` to get the associated boundary indices, so we instead find the closest data site to each boundary point.

```julia
function nearest_tuple(q, data)
Expand Down Expand Up @@ -137,12 +137,12 @@ fig = Figure(fontsize=24)
ax1 = Axis3(fig[1, 1], xlabel="Longitude", ylabel="Latitude", zlabel="Elevation (km)", width=600, height=400, azimuth=0.9, title="(a): Original height data (n = $(length(elevation_data)))", titlealign=:left)
mesh!(ax1, data, triangles, color=elevation_data, colorrange=colorrange)
ax2 = Axis(fig[1, 2], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(b): Original height data (n = $(length(elevation_data)))", titlealign=:left)
tf = tricontourf!(ax2, data[:, 1], data[:, 2], elevation_data, color=elevation_data, triangulation=triangles', levels=levels)
tf = tricontourf!(ax2, tri, elevation_data, color=elevation_data, levels=levels)

ax3 = Axis3(fig[2, 1], xlabel="Longitude", ylabel="Latitude", zlabel="Elevation (km)", width=600, height=400, azimuth=0.9, title="(c): Downsampled height data (n = $(length(ds_elevation_data)))", titlealign=:left)
mesh!(ax3, ds_data, ds_triangles, color=ds_elevation_data, colorrange=colorrange)
ax4 = Axis(fig[2, 2], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(d): Downsampled height data (n = $(length(ds_elevation_data)))", titlealign=:left)
tricontourf!(ax4, ds_data[:, 1], ds_data[:, 2], ds_elevation_data, color=ds_elevation_data, triangulation=ds_triangles', levels=levels)
tricontourf!(ax4, ds_tri, ds_elevation_data, color=ds_elevation_data, levels=levels)
Colorbar(fig[1:2, 3], tf)
resize_to_layout!(fig)
```
Expand Down Expand Up @@ -200,7 +200,7 @@ function plot_results!(fig, i1, j1, i2, j2, x, y, xg, yg, vals, title1, title2,
ylims!(ax, c, d)
return m
end
function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
fig = Figure(fontsize=24)
m1 = plot_results!(fig, 1, 1, 1, 2, x, y, xg, yg, sibson_vals, "(a): Sibson", "(b): Sibson", query_triangles, interpolant.triangulation, a, b, c, d, e, f, nx, ny)
m2 = plot_results!(fig, 1, 3, 1, 4, x, y, xg, yg, sibson_1_vals, "(c): Sibson-1", "(d): Sibson-1", query_triangles, interpolant.triangulation, a, b, c, d, e, f, nx, ny)
Expand All @@ -215,15 +215,15 @@ function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, n
ylims!(ax, c, d)
zlims!(ax, e, f)
ax = Axis(fig[4, 4], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(o): Original height data", titlealign=:left)
tricontourf!(ax, data[:, 1], data[:, 2], elevation_data, color=elevation_data, triangulation=triangles', levels=levels)
tricontourf!(ax, tri, elevation_data, color=elevation_data, levels=levels)
xlims!(ax, a, b)
ylims!(ax, c, d)
Colorbar(fig[1:4, 5], m1)
resize_to_layout!(fig)
return fig
end
e, f = 0.0, 4.5
fig = plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
```

```@raw html
Expand All @@ -246,7 +246,7 @@ triangle_vals_p = interpolant(x, y; method=Triangle(), parallel=true, project=fa
nearest_vals_p = interpolant(x, y; method=Nearest(), parallel=true, project=false)
farin_vals_p = interpolant(x, y; method=Farin(), parallel=true, project=false)
hiyoshi_vals_p = interpolant(x, y; method=Hiyoshi(2), parallel=true, project=false)
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
```

```@raw html
Expand All @@ -270,7 +270,7 @@ triangle_vals_p[exterior_idx] .= Inf
nearest_vals_p[exterior_idx] .= Inf
farin_vals_p[exterior_idx] .= Inf
hiyoshi_vals_p[exterior_idx] .= Inf
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
```

```@raw html
Expand Down
18 changes: 8 additions & 10 deletions test/doc_examples/differentiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ z = f.(x, y)
tri = triangulate([x'; y'])
vorn = voronoi(tri)

#= temporary deletion
fig = Figure(fontsize=50, resolution=(1800, 600))
ax = Axis(fig[1, 1], xlabel="x", ylabel="y", width=600, height=600, title="(a): Data and triangulation", titlealign=:left)
scatter!(ax, x, y, color=:black, markersize=9)
triplot!(ax, tri, color=:black, linewidth=2, show_convex_hull=false)
voronoiplot!(ax, vorn, strokecolor=:blue)
triplot!(ax, tri, color=:black, linewidth=2)
voronoiplot!(ax, vorn, strokecolor=:blue, color=(:white, 0.0))
xlims!(ax, 0, 1)
ylims!(ax, 0, 1)

Expand All @@ -70,7 +69,6 @@ resize_to_layout!(fig)
fig

@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "example_data.png") fig
=#

# Generating gradients at the data sites
function plot_f2(fig, x, y, vals, title, i, tri, levels, show_3d=true, zlabel="z")
Expand Down Expand Up @@ -219,16 +217,16 @@ function plot_hessians(H, f′′, xg, yg)
return fig, ε
end
∂ = differentiate(itp, 2)
∇Hg = ∂(_x, _y; interpolant_method=Sibson(1), method = Iterative())
∇Hg = ∂(_x, _y; interpolant_method=Sibson(1), method=Iterative())
∇g = first.(∇Hg)
Hg = last.(∇Hg)
fig∇, ε∇ = plot_gradients(∇g, f′, xg, yg)
figH, εH = plot_hessians(Hg, f′′, xg, yg)
zlims!(figH.content[4], -25, 25)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "hessian_surface.png") figH by=psnr_equality(18)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "gradient_surface_2.png") fig∇ by=psnr_equality(18)
@test ε∇ ≈ 19.07546882353911 rtol=1e-1
@test εH ≈ 51.1267212244942 rtol=1e-1
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "hessian_surface.png") figH by = psnr_equality(18)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "gradient_surface_2.png") fig∇ by = psnr_equality(18)
@test ε∇ ≈ 19.07546882353911 rtol = 1e-1
@test εH ≈ 51.1267212244942 rtol = 1e-1

∇Hg = ∂(_x, _y; interpolant_method=Sibson(1), method=Direct())
∇g = first.(∇Hg)
Expand All @@ -244,7 +242,7 @@ zlims!(figH.content[4], -25, 25)
function rrmserr(z, ẑ, ∂, x, y)
tri = ∂.interpolant.triangulation
num = 0.0
den = 0.0
den = 0.0
points = get_points(tri)
ch = get_convex_hull_indices(tri)
for (zᵢ, ẑᵢ, xᵢ, yᵢ) in zip(z, ẑ, x, y)
Expand Down
2 changes: 1 addition & 1 deletion test/doc_examples/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Colorbar(fig[1, 3], c)
resize_to_layout!(fig)
fig

@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "sibson_vs_sibson1_errors.png") fig
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "sibson_vs_sibson1_errors.png") fig by=psnr_equality(20)

esib0 = 100sqrt(sum((sib_vals .- f.(_x, _y)).^2) / sum(sib_vals.^2))
esib1 = 100sqrt(sum((sib1_vals .- f.(_x, _y)).^2) / sum(sib_vals.^2))
Expand Down
6 changes: 2 additions & 4 deletions test/doc_examples/interpolation_math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ points = [
tri = triangulate(points)
vorn = voronoi(tri)
fig, ax, sc = voronoiplot(vorn, axis=(width=400, height=400), generator_color=:red)
xlims!(ax, -2, 2)
ylims!(ax, -2, 2)
resize_to_layout!(fig)
fig

Expand Down Expand Up @@ -64,12 +62,12 @@ vorn2 = voronoi(tri2, false)
V = get_polygon(vorn2, num_points(tri2))
AX2 = get_area(vorn2, num_points(tri2))

fig, ax, sc = voronoiplot(vorn, axis=(width=400, height=400), generator_color=:red, markersize=7)
fig, ax, sc = voronoiplot(vorn, axis=(width=400, height=400), generator_color=:red, markersize=7, color=:white)
xlims!(ax, 3, 9)
ylims!(ax, 1.5, 7)
Vcoords = [get_polygon_point(vorn2, i) for i in V]
poly!(ax, Vcoords, color=(:blue, 0.2), strokewidth=2, strokecolor=:blue)
scatter!(ax, [q], color = :magenta, markersize=14)
scatter!(ax, [q], color=:magenta, markersize=14)
resize_to_layout!(fig)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "new_tile.png") fig

Expand Down
2 changes: 1 addition & 1 deletion test/doc_examples/readme_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ end
resize_to_layout!(fig)
fig

@test_reference normpath(@__DIR__, "../..", "example.png") fig
@test_reference normpath(@__DIR__, "../..", "example.png") fig by=psnr_equality(20)
14 changes: 7 additions & 7 deletions test/doc_examples/swiss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ fig = Figure(fontsize=24)
ax1 = Axis3(fig[1, 1], xlabel="Longitude", ylabel="Latitude", zlabel="Elevation (km)", width=600, height=400, azimuth=0.9, title="(a): Original height data (n = $(length(elevation_data)))", titlealign=:left)
mesh!(ax1, data, triangles, color=elevation_data, colorrange=colorrange)
ax2 = Axis(fig[1, 2], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(b): Original height data (n = $(length(elevation_data)))", titlealign=:left)
tf = tricontourf!(ax2, data[:, 1], data[:, 2], elevation_data, color=elevation_data, triangulation=triangles', levels=levels)
tf = tricontourf!(ax2, tri, elevation_data, color=elevation_data, levels=levels)

ax3 = Axis3(fig[2, 1], xlabel="Longitude", ylabel="Latitude", zlabel="Elevation (km)", width=600, height=400, azimuth=0.9, title="(c): Downsampled height data (n = $(length(ds_elevation_data)))", titlealign=:left)
mesh!(ax3, ds_data, ds_triangles, color=ds_elevation_data, colorrange=colorrange)
ax4 = Axis(fig[2, 2], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(d): Downsampled height data (n = $(length(ds_elevation_data)))", titlealign=:left)
tricontourf!(ax4, ds_data[:, 1], ds_data[:, 2], ds_elevation_data, color=ds_elevation_data, triangulation=ds_triangles', levels=levels)
tricontourf!(ax4, ds_tri, ds_elevation_data, color=ds_elevation_data, levels=levels)
Colorbar(fig[1:2, 3], tf)
resize_to_layout!(fig)
# save(normpath(@__DIR__, "..", "docs", "src", "figures", "swiss_heights.png"), fig)
Expand Down Expand Up @@ -115,7 +115,7 @@ function plot_results!(fig, i1, j1, i2, j2, x, y, xg, yg, vals, title1, title2,
ylims!(ax, c, d)
return m
end
function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
fig = Figure(fontsize=24)
m1 = plot_results!(fig, 1, 1, 1, 2, x, y, xg, yg, sibson_vals, "(a): Sibson", "(b): Sibson", query_triangles, interpolant.triangulation, a, b, c, d, e, f, nx, ny)
m2 = plot_results!(fig, 1, 3, 1, 4, x, y, xg, yg, sibson_1_vals, "(c): Sibson-1", "(d): Sibson-1", query_triangles, interpolant.triangulation, a, b, c, d, e, f, nx, ny)
Expand All @@ -130,15 +130,15 @@ function plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, n
ylims!(ax, c, d)
zlims!(ax, e, f)
ax = Axis(fig[4, 4], xlabel="Longitude", ylabel="Latitude", width=600, height=400, title="(o): Original height data", titlealign=:left)
tricontourf!(ax, data[:, 1], data[:, 2], elevation_data, color=elevation_data, triangulation=triangles', levels=levels)
tricontourf!(ax, tri, elevation_data, color=elevation_data, levels=levels)
xlims!(ax, a, b)
ylims!(ax, c, d)
Colorbar(fig[1:4, 5], m1)
resize_to_layout!(fig)
return fig
end
e, f = 0.0, 4.5
fig = plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals, sibson_1_vals, laplace_vals, triangle_vals, nearest_vals, farin_vals, hiyoshi_vals, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
# save(normpath(@__DIR__, "..", "docs", "src", "figures", "swiss_heights_interpolated.png"), fig)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "swiss_heights_interpolated.png") fig

Expand All @@ -151,7 +151,7 @@ nearest_vals_p = interpolant(x, y; method=Nearest(), parallel=true, project=fals
farin_vals_p = interpolant(x, y; method=Farin(), parallel=true, project=false)
hiyoshi_vals_p = interpolant(x, y; method=Hiyoshi(2), parallel=true, project=false)

fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
# save(normpath(@__DIR__, "..", "docs", "src", "figures", "swiss_heights_interpolated_projected.png"), fig)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "swiss_heights_interpolated_projected.png") fig

Expand All @@ -165,7 +165,7 @@ nearest_vals_p[exterior_idx] .= Inf
farin_vals_p[exterior_idx] .= Inf
hiyoshi_vals_p[exterior_idx] .= Inf

fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data)
fig = plot_results(sibson_vals_p, sibson_1_vals_p, laplace_vals_p, triangle_vals_p, nearest_vals_p, farin_vals_p, hiyoshi_vals_p, query_triangles, interpolant, a, b, c, d, e, f, nx, ny, data, triangles, elevation_data, tri)
# save(normpath(@__DIR__, "..", "docs", "src", "figures", "swiss_heights_interpolated_projected_boundary.png"), fig)
@test_reference normpath(@__DIR__, "../..", "docs", "src", "figures", "swiss_heights_interpolated_projected_boundary.png") fig

2 changes: 1 addition & 1 deletion test/interpolation/influence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hiyoshi_vals = itp(x, y; method=Hiyoshi(2)) |> x -> reshape(x, (length(xg), leng
function plot_influence(i, j, title, vals, xg, yg, vorn, points)
ax = Axis(fig[i, j], xlabel="x", ylabel="y", width=600, height=600, title=title, titlealign=:left)
contourf!(ax, xg, yg, vals, color=vals, colormap=:viridis, levels=0:0.05:1, extendlow=:auto, extendhigh=:auto)
voronoiplot!(ax, vorn, strokecolor=:red)
voronoiplot!(ax, vorn, strokecolor=:red, color=(:white,0.0))
scatter!(ax, points, color=:red)
xlims!(ax, -1, 1)
ylims!(ax, -1, 1)
Expand Down
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ using SafeTestsets
@safetestset "Structs" begin
include("interpolation/structs.jl")
end
#@safetestset "Influence" begin
# include("interpolation/influence.jl")
#end
@safetestset "Influence" begin
include("interpolation/influence.jl")
end
@safetestset "Constrained Triangulations" begin
include("interpolation/constrained.jl")
end
Expand Down Expand Up @@ -53,9 +53,9 @@ end
@safetestset "Differentiation Example" begin
include("doc_examples/differentiation.jl")
end
#@safetestset "Interpolation Math" begin
# include("doc_examples/interpolation_math.jl")
#end
@safetestset "Interpolation Math" begin
include("doc_examples/interpolation_math.jl")
end
@safetestset "Switzerland" begin
include("doc_examples/swiss.jl")
end
Expand Down
Loading