@@ -75,14 +75,14 @@ function getLogTicks(x, minmax)
75
75
minor_text_limit = 8
76
76
min = ceil (log10 (minx))
77
77
max = floor (log10 (maxx))
78
- major = 10 .^ (min: max)
78
+ major = exp10 . (min: max)
79
79
if Plots. backend () != Plots. GRBackend ()
80
80
majorText = [latexstring (" \$ 10^{$(round (Int64,i)) }\$ " ) for i = min: max]
81
81
else
82
82
majorText = [" 10^{$(round (Int64,i)) }" for i = min: max]
83
83
end
84
84
if max - min < major_minor_limit
85
- minor = [j* 10 ^ i for i = (min- 1 ): (max+ 1 ) for j = 2 : 9 ]
85
+ minor = [j* exp10 (i) for i = (min- 1 ): (max+ 1 ) for j = 2 : 9 ]
86
86
if Plots. backend () != Plots. GRBackend ()
87
87
minorText = [latexstring (" \$ $j \\ cdot10^{$(round (Int64,i)) }\$ " ) for i = (min- 1 ): (max+ 1 ) for j = 2 : 9 ]
88
88
else
255
255
""" `fig = bodeplot(sys, args...)`, `bodeplot(LTISystem[sys1, sys2...], args...; plotphase=true, kwargs...)`
256
256
257
257
Create a Bode plot of the `LTISystem`(s). A frequency vector `w` can be
258
- optionally provided.
258
+ optionally provided. To change the Magnitude scale see `setPlotScale(str)`
259
259
260
260
`kwargs` is sent as argument to Plots.plot."""
261
261
bodeplot
@@ -270,7 +270,7 @@ bodeplot
270
270
271
271
for (si,s) = enumerate (systems)
272
272
mag, phase = bode (s, w)[1 : 2 ]
273
- if _PlotScale == " dB"
273
+ if _PlotScale == " dB" # Set by setPlotScale(str) globally
274
274
mag = 20 * log10 .(mag)
275
275
end
276
276
@@ -298,7 +298,7 @@ bodeplot
298
298
title --> " Bode plot from: u($j )"
299
299
label --> " \$ G_{$(si) }\$ "
300
300
linestyle --> styledict[:l ]
301
- color --> styledict[:c ]
301
+ seriescolor --> styledict[:c ]
302
302
w, magdata
303
303
end
304
304
plotphase || continue
@@ -312,7 +312,7 @@ bodeplot
312
312
xguide --> " Frequency (rad/s)"
313
313
label --> " \$ G_{$(si) }\$ "
314
314
linestyle --> styledict[:l ]
315
- color --> styledict[:c ]
315
+ seriescolor --> styledict[:c ]
316
316
w, unwrap ? ControlSystems. unwrap (phasedata.* (pi / 180 )).* (180 / pi ) : phasedata
317
317
end
318
318
@@ -721,7 +721,7 @@ pzmap
721
721
@recipe function pzmap (p:: Pzmap )
722
722
systems = p. args[1 ]
723
723
if systems[1 ]. nu + systems[1 ]. ny > 2
724
- warn (" pzmap currently only supports SISO systems. Only transfer function from u₁ to y₁ will be shown" )
724
+ @ warn (" pzmap currently only supports SISO systems. Only transfer function from u₁ to y₁ will be shown" )
725
725
end
726
726
seriestype := :scatter
727
727
title --> " Pole-zero map"
@@ -730,15 +730,15 @@ pzmap
730
730
z,p,k = zpkdata (system)
731
731
if ! isempty (z[1 ])
732
732
@series begin
733
- markershape := :c
733
+ markershape --> :c
734
734
markersize --> 15.
735
735
markeralpha --> 0.5
736
736
real (z[1 ]),imag (z[1 ])
737
737
end
738
738
end
739
739
if ! isempty (p[1 ])
740
740
@series begin
741
- markershape := :x
741
+ markershape --> :x
742
742
markersize := 15.
743
743
real (p[1 ]),imag (p[1 ])
744
744
end
@@ -749,7 +749,7 @@ pzmap
749
749
S,C = sin .(v),cos .(v)
750
750
@series begin
751
751
linestyle --> :dash
752
- c := :black
752
+ linecolor := :black
753
753
grid --> true
754
754
C,S
755
755
end
0 commit comments