Skip to content

Commit

Permalink
remove minsmax check in favour of automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlerson committed Apr 11, 2024
1 parent 929b4c5 commit e82dbd9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/makieplotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,19 +330,6 @@ function Makie.plot!(SF::Surface{<:Tuple{<:MakiePlotter{2}}})
coords = @lift begin
Point3f[Point3f(coord[1], coord[2], $(solution)[idx]) for (idx, coord) in enumerate(plotter.physical_coords)]
end
mins = @lift(minimum(x->isnan(x) ? 1e10 : x, $solution))
maxs = @lift(maximum(x->isnan(x) ? -1e10 : x, $solution))
SF[:colorrange] = @lift begin
if isapprox($mins,$maxs)
if isapprox($mins,zero($mins)) && isapprox($maxs,zero($maxs))
(1e-18,2e-18)
else
($mins,1.01($maxs))
end
else
($mins,$maxs)
end
end
return Makie.mesh!(SF, coords, plotter.vis_triangles, color=solution, scale_plot=SF[:scale_plot], shading=SF[:shading], colormap=SF[:colormap], colorrange=SF[:colorrange], nan_color=SF[:nan_color])
end

Expand Down

0 comments on commit e82dbd9

Please sign in to comment.