Decade missing in bode plot

When I plot the bode diagram it hides the decade 10¹

begin
	using ControlSystems
	using Plots
	h₁ = tf(
		[10],
		[1, 20]
	)
	bodeplot(h₁)
end

How to show the missing decade?

The xticks are autogenerated, but you can always pass your own: xticks = [1, 10, 100]

1 Like

You could fix first the common frequency axis, and then the individual subplots y-axes (better to use both ticks and lims keywords for more general case):

bodeplot(h₁, xticks=10.0.^(0:3), xlims=(1, 10^3))
plot!(yticks=10.0.^(-2:0), ylims=(10^-2,1), subplot=1)
plot!(yticks=-90:30:0, ylims=(-90,0), subplot=2)

1 Like

according to baggepinnen in:

This is up to the plotting backend to select, if you plot with GR (the default backend), it does indeed look like they do not display the 1e1 tick

  1. Choose another backend, e.g. plotly() or
  2. Manually specify the ticks using keyword argument xticks = , e.g., bodeplot(h₁, xticks=exp10.(0:0.5:3))