From 43457a1513b3d4e69c33056fe5e53d65f4d08a7e Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Wed, 1 Feb 2023 13:43:12 +0100 Subject: [PATCH] plot the phase guide at the correct phase phase guides should be shown at pm 180 deg, not at 0. fixes #771 --- lib/ControlSystemsBase/src/plotting.jl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/ControlSystemsBase/src/plotting.jl b/lib/ControlSystemsBase/src/plotting.jl index 1ce100858..7e8eca5ca 100644 --- a/lib/ControlSystemsBase/src/plotting.jl +++ b/lib/ControlSystemsBase/src/plotting.jl @@ -701,16 +701,13 @@ A frequency vector `w` can be optionally provided. @series begin color --> :gray linestyle --> :dash - [w[1],w[end]], [oneLine,oneLine] + seriestype := :hline + @show size(pm), size(fullPhase) + ((fullPhase .- pm) .* ones(1, 2))' end @series begin [wpm wpm]', [fullPhase fullPhase-pm]' end - @series begin - color --> :gray - linestyle --> :dash - [w[1] w[end]]', ((fullPhase .- pm) .* ones(1, 2))' - end end end end