File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
lib/ControlSystemsBase/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -290,8 +290,6 @@ _span(vec) = -(reverse(extrema(vec))...)
290290 # xticks --> getLogTicks(ws, getlims(:xlims, plotattributes, ws))
291291 grid --> true
292292
293- link --> :x
294-
295293 for (si,s) = enumerate (systems)
296294 if balance
297295 sbal = balance_statespace (s)[1 ]
@@ -319,6 +317,7 @@ _span(vec) = -(reverse(extrema(vec))...)
319317 continue
320318 end
321319 phasedata = vec (phase[i, j, :])
320+ local inds
322321 @series begin
323322 yscale --> _PlotScaleFunc
324323 xscale --> :log10
@@ -351,6 +350,10 @@ _span(vec) = -(reverse(extrema(vec))...)
351350 end
352351 end
353352
353+ if eltype (phasedata) <: AbstractFloat
354+ link --> :x # To guard agains https://github.com/JuliaPlots/Plots.jl/issues/5092 when using uncertain number systems
355+ end
356+
354357 @series begin
355358 xscale --> :log10
356359 # ylims := ylimsphase
@@ -361,8 +364,10 @@ _span(vec) = -(reverse(extrema(vec))...)
361364 label --> " "
362365 group --> group_ind
363366 phasedata = unwrap ? ControlSystemsBase. unwrap (phasedata.* (pi / 180 )).* (180 / pi ) : phasedata
364- if adaptive
367+ if adaptive && eltype (phasedata) <: AbstractFloat # To guard agains https://github.com/JuliaPlots/Plots.jl/issues/5092 when using uncertain number systems
365368 downsample (ws, phasedata, _span (phasedata)/ 500 )[1 : 2 ]
369+ elseif adaptive
370+ ws[inds], phasedata[inds]
366371 else
367372 ws, phasedata
368373 end
You can’t perform that action at this time.
0 commit comments