Skip to content

Commit cbfe3c9

Browse files
authored
Merge pull request #997 from JuliaControl/hoverfix
fix hover with adaptive sampling nyquist plot
2 parents 7d88db8 + 70d3c45 commit cbfe3c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/ControlSystemsBase/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "ControlSystemsBase"
22
uuid = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
33
authors = ["Dept. Automatic Control, Lund University"]
44
repo = "https://github.com/JuliaControl/ControlSystems.jl.git"
5-
version = "1.16.0"
5+
version = "1.16.1"
66

77
[deps]
88
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"

lib/ControlSystemsBase/src/plotting.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,15 @@ nyquistplot
452452
if lab !== nothing
453453
label --> lab
454454
end
455-
hover --> [hz ? Printf.@sprintf("f = %.3g", w/2π) : Printf.@sprintf("ω = %.3g", w) for w in w]
455+
hover_data = [hz ? Printf.@sprintf("f = %.3g", w/2π) : Printf.@sprintf("ω = %.3g", w) for w in w]
456456
if adaptive
457457
indsre = downsample(w, redata, 1/500)[3]
458458
indsim = downsample(w, imdata, 1/500)[3]
459459
inds = sort!(union(indsre, indsim))
460+
hover --> hover_data[inds]
460461
redata[inds], imdata[inds]
461462
else
463+
hover --> hover_data
462464
redata, imdata
463465
end
464466
end

0 commit comments

Comments
 (0)