Skip to content

Commit 2857867

Browse files
committed
Switch plots backend to only plot FS when given Val(ζ) arg
Plots just doesn't handle multiple surface plots gracefully.
1 parent c68eb04 commit 2857867

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

ext/NeumannKelvinPlotsExt.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ using NeumannKelvin,Plots
33
import NeumannKelvin: viz,cₚu,xyζ,QuadKernel
44

55
# Free surface viz function
6-
function viz(sys::Union{FSPanelSystem,NKPanelSystem};kwargs...)
7-
# same body plot
8-
cp,vectors = cₚu(sys)
9-
viz(sys.body,cp;vectors,label="cₚ",kwargs...)
10-
# add free surface
6+
function viz(sys::Union{FSPanelSystem,NKPanelSystem},::Val{ζ};kwargs...)
117
x,y,z = xyζ(sys)
12-
ζmax = maximum(abs, z); @. z[abs(z)<ζmax/20] = 0
13-
surface!(x,y,z';colormap = :balance, clims = (-ζmax,ζmax))
8+
ζmax = maximum(abs, z)
9+
surface(x,y,z';colormap = :balance, clims = (-ζmax,ζmax),
10+
colorbar=true, colorbar_title="ζ")
1411
end
1512
1613
# Generate mesh from Table data

0 commit comments

Comments
 (0)